summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/telnet/telnet/sys_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/appl/telnet/telnet/sys_bsd.c')
-rw-r--r--crypto/heimdal/appl/telnet/telnet/sys_bsd.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/crypto/heimdal/appl/telnet/telnet/sys_bsd.c b/crypto/heimdal/appl/telnet/telnet/sys_bsd.c
index 334ef04..e47079e 100644
--- a/crypto/heimdal/appl/telnet/telnet/sys_bsd.c
+++ b/crypto/heimdal/appl/telnet/telnet/sys_bsd.c
@@ -33,7 +33,7 @@
#include "telnet_locl.h"
-RCSID("$Id: sys_bsd.c,v 1.23 1998/06/09 19:24:46 joda Exp $");
+RCSID("$Id: sys_bsd.c,v 1.26 2000/10/19 21:19:57 assar Exp $");
/*
* The following routines try to encapsulate what is system dependent
@@ -314,10 +314,10 @@ TerminalRestoreState()
#ifdef SIGTSTP
-static RETSIGTYPE susp();
+static RETSIGTYPE susp(int);
#endif /* SIGTSTP */
#ifdef SIGINFO
-static RETSIGTYPE ayt();
+static RETSIGTYPE ayt(int);
#endif
void
@@ -495,7 +495,7 @@ TerminalNewMode(int f)
} else {
sigset_t sm;
#ifdef SIGINFO
- RETSIGTYPE ayt_status();
+ RETSIGTYPE ayt_status(int);
signal(SIGINFO, ayt_status);
#endif
@@ -774,6 +774,11 @@ process_rings(int netin,
int returnValue = 0;
static struct timeval TimeValue = { 0 };
+ if (net >= FD_SETSIZE
+ || tout >= FD_SETSIZE
+ || tin >= FD_SETSIZE)
+ errx (1, "fd too large");
+
if (netout) {
FD_SET(net, &obits);
}
@@ -791,7 +796,7 @@ process_rings(int netin,
FD_SET(net, &xbits);
}
#endif
- if ((c = select(16, &ibits, &obits, &xbits,
+ if ((c = select(FD_SETSIZE, &ibits, &obits, &xbits,
(poll == 0)? (struct timeval *)0 : &TimeValue)) < 0) {
if (c == -1) {
/*
OpenPOWER on IntegriCloud