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>
diff --git a/unix/syscall_aix.go b/unix/syscall_aix.go
index d272322..d8efb71 100644
--- a/unix/syscall_aix.go
+++ b/unix/syscall_aix.go
@@ -252,7 +252,7 @@
 			}
 		}
 
-		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