(loop): check that the fd's aren't too large to select on

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9186 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-11-15 22:59:21 +00:00
parent f64041aa23
commit 57975d729b

View File

@@ -404,6 +404,9 @@ loop (int from0, int to0,
int max_fd;
int count = 2;
if(from0 >= FD_SETSIZE || from1 >= FD_SETSIZE || from2 >= FD_SETSIZE)
errx (1, "fd too large");
FD_ZERO(&real_readset);
FD_SET(from0, &real_readset);
FD_SET(from1, &real_readset);