poll: Handle FD_SETSIZE in bsd_poll().

This commit is contained in:
Andreas Schneider
2010-06-22 10:38:47 +02:00
parent e2480fbaba
commit a2a98fb5bc

View File

@@ -111,7 +111,7 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
/* compute fd_sets and find largest descriptor */
for (rc = -1, max_fd = 0, i = 0; i < nfds; i++) {
if (fds[i].fd == SSH_INVALID_SOCKET) {
if (fds[i].fd == SSH_INVALID_SOCKET || fds[i].fd >= FD_SETSIZE) {
continue;
}