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: call net.ResolveIPAddr with nul char causes a panic in the goroutine on Windows build #31597
What did you do?
My product's server crashed and reproduced the problem from the panic log.
The reproduction program does not work on Go Playground. Create a windows build and run it.
What did you expect to see?
I wanted to return an error if an invalid string is passed.
What did you see instead?
Output of Windows build binary (
Output of Linux build binary (
net.LookupHost("foo\x00bar") may resolve successfully on some networks. Reduce the scope of the test to check only that the call doesn't panic. Also update the test comment to reference the relevant issue. Fixes #37031 Updates #31597 Change-Id: If175deed8121625ef507598c6145e937ccffd89e Reviewed-on: https://go-review.googlesource.com/c/go/+/217729 Reviewed-by: Ian Lance Taylor <email@example.com> Run-TryBot: Dmitri Shuralyov <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>