diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index a65e41dc621..f7551c10562 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -257,8 +257,8 @@ func (sa *SockaddrUnix) sockaddr() (uintptr, _Socklen, int) { sa.raw.Path[0] = 0 } - // length is family, name, NUL. - return uintptr(unsafe.Pointer(&sa.raw)), 1 + _Socklen(n) + 1, 0 + // length is family (uint16), name, NUL. + return uintptr(unsafe.Pointer(&sa.raw)), 2 + _Socklen(n) + 1, 0 } type SockaddrLinklayer struct {