diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go index 1663b78ef00..2bc5592d5ad 100644 --- a/src/net/lookup_test.go +++ b/src/net/lookup_test.go @@ -1179,12 +1179,9 @@ func TestWithUnexpiredValuesPreserved(t *testing.T) { } } -// Issue 31586: don't crash on null byte in name +// Issue 31597: don't panic on null byte in name func TestLookupNullByte(t *testing.T) { testenv.MustHaveExternalNetwork(t) testenv.SkipFlakyNet(t) - _, err := LookupHost("foo\x00bar") // used to crash on Windows - if err == nil { - t.Errorf("unexpected success") - } + LookupHost("foo\x00bar") // check that it doesn't panic; it used to on Windows }