mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:45:07 -05:00
sched: check that added file descriptor fits in fd_set
This commit is contained in:
3
sched.c
3
sched.c
@@ -169,6 +169,9 @@ SCH_AddInputFileHandler
|
||||
|
||||
assert(initialised);
|
||||
|
||||
if (fd >= FD_SETSIZE)
|
||||
LOG_FATAL(LOGF_Scheduler, "Too many file descriptors");
|
||||
|
||||
/* Don't want to allow the same fd to register a handler more than
|
||||
once without deleting a previous association - this suggests
|
||||
a bug somewhere else in the program. */
|
||||
|
||||
Reference in New Issue
Block a user