From 135f5cf634b2fbf3b10f3f5c9c596418fbd07273 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 18 Sep 2015 13:04:02 +0000 Subject: [PATCH] Properly initialize siginfo_t object passed to print_stopped function * strace.c (trace): Clear the whole siginfo_t variable before passing it to ptrace(PTRACE_GETSIGINFO) because the latter may initialize only a part of the structure. --- strace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strace.c b/strace.c index 9b93e796..d610f707 100644 --- a/strace.c +++ b/strace.c @@ -2194,7 +2194,7 @@ trace(void) } if (sig != syscall_trap_sig) { - siginfo_t si; + siginfo_t si = {}; /* * True if tracee is stopped by signal -- 2.50.1