summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-04 11:03:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-04 11:03:16 +0000
commit308c196b37613c9acf1f977b0f6f07065a2584e7 (patch)
tree5f06b73331518140a81d3e83411124f375c4f42b /usr.sbin
parent63cf288313bbd20d68e07a57484b7b38acd01dce (diff)
do not exceed bounds of fd_set
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/inetd/inetd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index dd605b06c59..20ee453aa3e 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.25 1997/02/24 12:48:06 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.26 1997/06/04 11:03:15 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.25 1997/02/24 12:48:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.26 1997/06/04 11:03:15 deraadt Exp $";
#endif /* not lint */
/*
@@ -1256,6 +1256,7 @@ bump_nofile()
return -1;
}
rl.rlim_cur = MIN(rl.rlim_max, rl.rlim_cur + FD_CHUNK);
+ rl.rlim_cur = MIN(FD_SETSIZE, rl.rlim_cur + FD_CHUNK);
if (rl.rlim_cur <= rlim_ofile_cur) {
syslog(LOG_ERR,
"bump_nofile: cannot extend file limit, max = %d",