From: Dmitry V. Levin Date: Thu, 12 May 2016 14:27:49 +0000 (+0000) Subject: Do not sign-extend siginfo_t.si_syscall X-Git-Tag: v4.12~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49955948fb8696efd6fcb6ed4035241853ac085f;p=strace Do not sign-extend siginfo_t.si_syscall * printsiginfo.c (print_si_info): Explicitly cast si_syscall member of siginfo_t that has type "int" to "unsigned int", to avoid sign extension when passed to syscall_name function. --- diff --git a/printsiginfo.c b/printsiginfo.c index 4083e19a..240fd65e 100644 --- a/printsiginfo.c +++ b/printsiginfo.c @@ -198,7 +198,7 @@ print_si_info(const siginfo_t *sip, bool verbose) case SIGSYS: tprintf(", si_call_addr=%#lx, si_syscall=__NR_%s, si_arch=", (unsigned long) sip->si_call_addr, - syscall_name(sip->si_syscall)); + syscall_name((unsigned) sip->si_syscall)); printxval(audit_arch, sip->si_arch, "AUDIT_ARCH_???"); break; #endif