From eeea826567d53cbae5c7b40298dc2077e3c7cc8f Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 8 Oct 2000 21:38:27 +0000 Subject: [PATCH] (add_new_tcp): check for the socket fd being too large to select on git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9113 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kpasswd/kpasswdd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpasswd/kpasswdd.c b/kpasswd/kpasswdd.c index f876d263b..00ee787ee 100644 --- a/kpasswd/kpasswdd.c +++ b/kpasswd/kpasswdd.c @@ -456,6 +456,8 @@ doit (krb5_keytab keytab, int port) krb5_err (context, 1, errno, "bind(%s)", str); } maxfd = max (maxfd, sockets[i]); + if (maxfd >= FD_SETSIZE) + krb5_errx (context, 1, "fd too large"); FD_SET(sockets[i], &real_fdset); }