mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 13:58:05 +00:00
Protect ptrace_readv_string() with #ifdef HAVE_PROCESS_VM_READV
This commit is contained in:
parent
922772c6cb
commit
234c56b87f
@ -343,6 +343,7 @@ ptrace_setregs(int pid, struct sudo_ptrace_regs *regs)
|
|||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_PROCESS_VM_READV
|
||||||
/*
|
/*
|
||||||
* Read the string at addr and store in buf using process_vm_readv(2).
|
* Read the string at addr and store in buf using process_vm_readv(2).
|
||||||
* Returns the number of bytes stored, including the NUL.
|
* Returns the number of bytes stored, including the NUL.
|
||||||
@ -395,6 +396,7 @@ ptrace_readv_string(pid_t pid, unsigned long addr, char *buf, size_t bufsize)
|
|||||||
}
|
}
|
||||||
debug_return_ssize_t(-1);
|
debug_return_ssize_t(-1);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_PROCESS_VM_READV */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the string at addr and store in buf using ptrace(2).
|
* Read the string at addr and store in buf using ptrace(2).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user