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 (
The text was updated successfully, but these errors were encountered:
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 <firstname.lastname@example.org> Run-TryBot: Dmitri Shuralyov <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org>