diff --git a/src/net/unixsock_linux_test.go b/src/net/unixsock_linux_test.go index 18324407d5..3c8fd85a9f 100644 --- a/src/net/unixsock_linux_test.go +++ b/src/net/unixsock_linux_test.go @@ -50,6 +50,8 @@ func TestUnixAutobindClose(t *testing.T) { } func TestUnixAbstractLongNameNullStart(t *testing.T) { + // Create an abstract socket name that starts with a null byte ("\x00") + // whose length is the maximum of RawSockaddrUnix Path len paddedAddr := make([]byte, len(syscall.RawSockaddrUnix{}.Path)) copy(paddedAddr, "\x00abstract_test")