diff --git a/unix/syscall_aix.go b/unix/syscall_aix.go index d2723225..d8efb715 100644 --- a/unix/syscall_aix.go +++ b/unix/syscall_aix.go @@ -252,7 +252,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { } } - bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] sa.Name = string(bytes) return sa, nil