From: Eugene Syromyatnikov Date: Fri, 21 Jul 2017 18:15:24 +0000 (+0200) Subject: pathtrace: limit amount of checked poll fds similarly to select limit X-Git-Tag: v4.19~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=456c95cdc2f390c231fc6a5cac6069a0e34030f6;p=strace pathtrace: limit amount of checked poll fds similarly to select limit * pathtrace.c (pathtrace_match_set): Limit the maximum descriptor number checked for fd match in poll family syscalls to 1024 * 1024. --- diff --git a/pathtrace.c b/pathtrace.c index 4585e26d..b0dd8f99 100644 --- a/pathtrace.c +++ b/pathtrace.c @@ -323,6 +323,8 @@ pathtrace_match_set(struct tcb *tcp, struct path_set *set) start = tcp->u_arg[0]; nfds = tcp->u_arg[1]; + if (nfds > 1024 * 1024) + nfds = 1024 * 1024; end = start + sizeof(fds) * nfds; if (nfds == 0 || end < start)