We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fa7a7c commit f11e5e4Copy full SHA for f11e5e4
unix/syscall_linux.go
@@ -2252,7 +2252,7 @@ func (fh *FileHandle) Bytes() []byte {
2252
if n == 0 {
2253
return nil
2254
}
2255
- 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)
2256
2257
2258
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
0 commit comments