]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
Make sure we don't do FD_SET(fd, set) with fd >= FD_SETSIZE since
[ppp.git] / pppd / sys-linux.c
index bf6db3285a81a9a6cebe728476e600ea71dee3f7..4a27cd51e006ba7891b6ddb7cd13b93d3db44901 100644 (file)
@@ -1050,6 +1050,8 @@ void wait_input(struct timeval *timo)
  */
 void add_fd(int fd)
 {
+    if (fd >= FD_SETSIZE)
+       fatal("internal error: file descriptor too large (%d)", fd);
     FD_SET(fd, &in_fds);
     if (fd > max_in_fd)
        max_in_fd = fd;