[openssh-commits] [openssh] 01/01: Allow for fd = -1 in compat ppoll overflow check.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Nov 19 18:55:07 AEDT 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit b7ffbb17e37f59249c31f1ff59d6c5d80888f689
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Fri Nov 19 18:53:46 2021 +1100

    Allow for fd = -1 in compat ppoll overflow check.
    
    Fixes tests on at least FreeBSD 6, possibly others.
---
 openbsd-compat/bsd-poll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c
index b661c030..faef8343 100644
--- a/openbsd-compat/bsd-poll.c
+++ b/openbsd-compat/bsd-poll.c
@@ -50,7 +50,7 @@ ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmoutp,
 
 	for (i = 0; i < nfds; i++) {
 		fd = fds[i].fd;
-		if (fd >= FD_SETSIZE) {
+		if (fd != -1 && fd >= FD_SETSIZE) {
 			errno = EINVAL;
 			return -1;
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list