(stilloob): check that fds are not too large to select on
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9103 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -69,6 +69,8 @@ stilloob(void)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
FD_ZERO(&excepts);
|
FD_ZERO(&excepts);
|
||||||
|
if (net >= FD_SETSIZE)
|
||||||
|
errx (1, "fd too large");
|
||||||
FD_SET(net, &excepts);
|
FD_SET(net, &excepts);
|
||||||
value = select(net+1, 0, 0, &excepts, &timeout);
|
value = select(net+1, 0, 0, &excepts, &timeout);
|
||||||
} while ((value == -1) && (errno == EINTR));
|
} while ((value == -1) && (errno == EINTR));
|
||||||
|
Reference in New Issue
Block a user