mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-11-04 14:49:53 +08:00
fix process_vm_readv
This commit is contained in:
parent
28c9236c1d
commit
354f690e3e
@ -25,6 +25,9 @@ func vmRead(pid int, addr uintptr, buff []byte) (int, error) {
|
||||
localIov := getIovecs(&buff[0], l)
|
||||
remoteIov := getIovecs((*byte)(unsafe.Pointer(addr)), l)
|
||||
n, _, err := processVMReadv(pid, localIov, remoteIov, uintptr(0))
|
||||
if err == 0 {
|
||||
return int(n), nil
|
||||
}
|
||||
return int(n), err
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user