From: Dmitry V. Levin Date: Mon, 6 Feb 2012 17:13:59 +0000 (+0000) Subject: strace -P: fix handling of invalid syscalls X-Git-Tag: v4.7~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdec9cbcebd256dbebf8fd2f7e35dec55b8bd5ae;p=strace strace -P: fix handling of invalid syscalls * pathtrace.c (pathtrace_match): Check the given syscall number using SCNO_IN_RANGE. --- diff --git a/pathtrace.c b/pathtrace.c index d7ba87cc..5fa8be4c 100644 --- a/pathtrace.c +++ b/pathtrace.c @@ -179,6 +179,9 @@ pathtrace_match(struct tcb *tcp) if (selected[0] == NULL) return 1; + if (!SCNO_IN_RANGE(tcp->scno)) + return 0; + s = &sysent[tcp->scno]; if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC)))