Zero out register struct before calling ptrace_getregs().
Quiets a spurious valgrind warning.
This commit is contained in:
@@ -1713,6 +1713,7 @@ ptrace_intercept_execve(pid_t pid, struct intercept_closure *closure)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the registers. */
|
/* Get the registers. */
|
||||||
|
memset(®s, 0, sizeof(regs));
|
||||||
if (!ptrace_getregs(pid, ®s, msg)) {
|
if (!ptrace_getregs(pid, ®s, msg)) {
|
||||||
sudo_warn(U_("unable to get registers for process %d"), (int)pid);
|
sudo_warn(U_("unable to get registers for process %d"), (int)pid);
|
||||||
debug_return_bool(false);
|
debug_return_bool(false);
|
||||||
|
Reference in New Issue
Block a user