mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Check for FD_SET overrun.
This commit is contained in:
parent
ef9d72e14c
commit
012b8a4111
1 changed files with 2 additions and 0 deletions
|
|
@ -1029,6 +1029,8 @@ main(argc, argv)
|
|||
tv = &timeout;
|
||||
} else
|
||||
tv = NULL;
|
||||
if (s >= FD_SETSIZE)
|
||||
errx(1, "descriptor too big");
|
||||
memset(fdmaskp, 0, fdmasks);
|
||||
FD_SET(s, fdmaskp);
|
||||
cc = select(s + 1, fdmaskp, NULL, NULL, tv);
|
||||
|
|
|
|||
Loading…
Reference in a new issue