unix: use unsafe.Slice in (*FileHandle).Bytes

Change-Id: Ic2b88577ec6fd975bbba0538790d2ff312d85d3f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435776
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go
index 583ff00..e044d5b 100644
--- a/unix/syscall_linux.go
+++ b/unix/syscall_linux.go
@@ -2252,7 +2252,7 @@
 	if n == 0 {
 		return nil
 	}
-	return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n]
+	return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
 }
 
 // NameToHandleAt wraps the name_to_handle_at system call; it obtains