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

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9106 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-10-08 13:32:28 +00:00
parent 4b3c422399
commit 526ba90e4c

View File

@@ -969,6 +969,11 @@ my_telnet(int f, int p, char *host, int level, char *autoname)
FD_ZERO(&ibits);
FD_ZERO(&obits);
FD_ZERO(&xbits);
if (f >= FD_SETSIZE
|| p >= FD_SETSIZE)
fatal(net, "fd too large");
/*
* Never look for input if there's still
* stuff in the corresponding output buffer