mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
poll: Handle FD_SETSIZE in bsd_poll().
This commit is contained in:
@@ -111,7 +111,7 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
|
|||||||
|
|
||||||
/* compute fd_sets and find largest descriptor */
|
/* compute fd_sets and find largest descriptor */
|
||||||
for (rc = -1, max_fd = 0, i = 0; i < nfds; i++) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user