diff options
author | Andreas Schneider <asn@cynapses.org> | 2010-06-22 10:38:47 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-06-22 14:44:24 +0200 |
commit | 1d84821d93e8d31d3be1d81a764449426f8e4a2b (patch) | |
tree | 3a992d9950b59d2084b403271723f90409aa769a /libssh | |
parent | 07f607ec4c104d73b9ce258b16673c6fb9013861 (diff) | |
download | libssh-1d84821d93e8d31d3be1d81a764449426f8e4a2b.tar.gz libssh-1d84821d93e8d31d3be1d81a764449426f8e4a2b.tar.xz libssh-1d84821d93e8d31d3be1d81a764449426f8e4a2b.zip |
poll: Handle FD_SETSIZE in bsd_poll().
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libssh/poll.c b/libssh/poll.c index be3f628..5514774 100644 --- a/libssh/poll.c +++ b/libssh/poll.c @@ -136,7 +136,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; } |