mirror of git://anongit.mindrot.org/openssh.git
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…
Reference in New Issue