(add_new_tcp): check for the socket fd being too large to selct on
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9112 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -530,6 +530,12 @@ add_new_tcp (struct descr *d, int parent, int child)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s >= FD_SETSIZE) {
|
||||||
|
krb5_warnx(context, "socket FD too large");
|
||||||
|
close (s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
d[child].s = s;
|
d[child].s = s;
|
||||||
d[child].timeout = time(NULL) + TCP_TIMEOUT;
|
d[child].timeout = time(NULL) + TCP_TIMEOUT;
|
||||||
d[child].type = SOCK_STREAM;
|
d[child].type = SOCK_STREAM;
|
||||||
|
Reference in New Issue
Block a user