mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: fix -d=checkptr slice failures on aix
Fix unsafe conversions to slices that are missing length or capacity. Change-Id: I3a1f4d57e0884b647b4c3819ff014d09b87a1ce5 GitHub-Last-Rev: 9b6895a08d4d92fff16913c3d7b9495fecb741a1 GitHub-Pull-Request: golang/sys#66 Reviewed-on: https://go-review.googlesource.com/c/sys/+/225617 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Trust: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
bd2e13477e
commit
07df6a1414
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user