Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net: "runtime error: slice bounds out of range" parsing resolv.conf with unknown eight character options #8252
go version go1.3 darwin/amd64 There's an off by one difference between check and slice index in dnsconfig_unix.go that causes a crash if there are unrecognized eight character options in /etc/resolv.conf. An example resolv.conf that triggers this is: options timeout 2 options attempts 1 search internal nameserver 10.60.60.151 nameserver 10.60.60.254 (the "options attempts 1" line) It's possible this is an invalid resolv.conf; we won't be able to parse the options but should anyway not crash.
adg added a commit that referenced this issue
May 11, 2015
This issue was closed.