Mailing List Archive

[openssh] 01/01: Allow for fd = -1 in compat ppoll overflow check.
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@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@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits