syscall: fix array size for mmap slice creation

This commit is contained in:
Damian Gryski
2021-11-18 16:57:24 -08:00
committed by Ayke
parent b01ce95cb5
commit f8206b9bcc
+1 -1
View File
@@ -85,7 +85,7 @@ func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, e
if addr == unsafe.Pointer(^uintptr(0)) {
return nil, getErrno()
}
return (*[30]byte)(addr)[:length], nil
return (*[1 << 30]byte)(addr)[:length:length], nil
}
func Mprotect(b []byte, prot int) (err error) {