(doit): check that fds are not too large to select on

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9102 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-10-08 13:26:50 +00:00
parent c02ed215b8
commit 2f271d23fb

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1999 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997-2000 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -258,6 +258,8 @@ doit(int s,
FD_ZERO(&readset);
FD_ZERO(&writeset);
if (s >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET(s,&readset);
if (((state == STAT || state == RETR || state == TOP)
&& asked_for < count)