From 2d7599351787c5c9db78560923ed226e29ebe02f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 10 Aug 2020 18:44:06 -0500 Subject: socket: Fix inverted logic in __poll_chk (#341) --- libgcompat/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcompat/socket.c b/libgcompat/socket.c index e56199e..7536039 100644 --- a/libgcompat/socket.c +++ b/libgcompat/socket.c @@ -49,7 +49,7 @@ ssize_t __recvfrom_chk(int fd, void *buf, size_t len, size_t buflen, int flags, */ int __poll_chk(struct pollfd *fds, nfds_t nfds, int timeout, size_t fdslen) { - assert((fdslen / sizeof(*fds)) < nfds); + assert((fdslen / sizeof(*fds)) >= nfds); return poll(fds, nfds, timeout); } -- cgit v1.2.3-70-g09d2