summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-01-11 22:14:21 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-01-11 22:14:21 +0000
commitc38fdd35e74972b43fbb1adf46d859873f5a564f (patch)
tree57aee878dcbf49b7536d1e887a49d8639544c06d /usr.bin
parent502eb17877a338e42ce952bf2793496b656e43d5 (diff)
maxfd+1
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 17d79089d1a..2739ea31ecf 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.147 2001/01/10 19:43:20 deraadt Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.148 2001/01/11 22:14:20 markus Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -909,7 +909,7 @@ main(int ac, char **av)
sighup_restart();
if (fdset != NULL)
xfree(fdset);
- fdsetsz = howmany(maxfd, NFDBITS) * sizeof(fd_mask);
+ fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask);
fdset = (fd_set *)xmalloc(fdsetsz);
memset(fdset, 0, fdsetsz);
@@ -920,7 +920,7 @@ main(int ac, char **av)
FD_SET(startup_pipes[i], fdset);
/* Wait in select until there is a connection. */
- if (select(maxfd + 1, fdset, NULL, NULL, NULL) < 0) {
+ if (select(maxfd+1, fdset, NULL, NULL, NULL) < 0) {
if (errno != EINTR)
error("select: %.100s", strerror(errno));
continue;