diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | openbsd-compat/bsd-poll.c | 5 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20080830 | ||
2 | - (dtucker) [openbsd-compat/bsd-poll.c] correctly check for number of FDs | ||
3 | larger than FD_SETSIZE (OpenSSH only ever uses poll with one fd). Patch | ||
4 | from Nicholas Marriott. | ||
5 | |||
1 | 20080721 | 6 | 20080721 |
2 | - (djm) OpenBSD CVS Sync | 7 | - (djm) OpenBSD CVS Sync |
3 | - djm@cvs.openbsd.org 2008/07/23 07:36:55 | 8 | - djm@cvs.openbsd.org 2008/07/23 07:36:55 |
@@ -4721,4 +4726,4 @@ | |||
4721 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 4726 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
4722 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 4727 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
4723 | 4728 | ||
4724 | $Id: ChangeLog,v 1.5097 2008/07/23 07:42:29 djm Exp $ | 4729 | $Id: ChangeLog,v 1.5098 2008/08/29 21:32:37 dtucker Exp $ |
diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c index 284db3a1f..f899d7a24 100644 --- a/openbsd-compat/bsd-poll.c +++ b/openbsd-compat/bsd-poll.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bsd-poll.c,v 1.3 2008/04/04 05:16:36 djm Exp $ */ | 1 | /* $Id: bsd-poll.c,v 1.4 2008/08/29 21:32:38 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). | 4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). |
@@ -46,11 +46,12 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout) | |||
46 | struct timeval tv, *tvp = NULL; | 46 | struct timeval tv, *tvp = NULL; |
47 | 47 | ||
48 | for (i = 0; i < nfds; i++) { | 48 | for (i = 0; i < nfds; i++) { |
49 | fd = fds[i].fd; | ||
49 | if (fd >= FD_SETSIZE) { | 50 | if (fd >= FD_SETSIZE) { |
50 | errno = EINVAL; | 51 | errno = EINVAL; |
51 | return -1; | 52 | return -1; |
52 | } | 53 | } |
53 | maxfd = MAX(maxfd, fds[i].fd); | 54 | maxfd = MAX(maxfd, fd); |
54 | } | 55 | } |
55 | 56 | ||
56 | nmemb = howmany(maxfd + 1 , NFDBITS); | 57 | nmemb = howmany(maxfd + 1 , NFDBITS); |