strace -P: fix handling of invalid syscalls
* pathtrace.c (pathtrace_match): Check the given syscall number using SCNO_IN_RANGE.
This commit is contained in:
parent
e752bed4af
commit
bdec9cbceb
@ -179,6 +179,9 @@ pathtrace_match(struct tcb *tcp)
|
|||||||
if (selected[0] == NULL)
|
if (selected[0] == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (!SCNO_IN_RANGE(tcp->scno))
|
||||||
|
return 0;
|
||||||
|
|
||||||
s = &sysent[tcp->scno];
|
s = &sysent[tcp->scno];
|
||||||
|
|
||||||
if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC)))
|
if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user