mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-26 23:34:55 +02:00
Allow for fd = -1 in compat ppoll overflow check.
Fixes tests on at least FreeBSD 6, possibly others.
This commit is contained in:
parent
04b172da5b
commit
b7ffbb17e3
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user