随笔-FD_SET崩溃(crash caused by FD_SET buffer overflow)
https://stackoverflow.com/questions/20618308/fd-set-causing-seg-fault
https://linux.die.net/man/3/fd_set
Notes
An fd_set is a fixed size buffer. Executing FD_CLR() or FD_SET() with a value of fd that is negative or is equal to or larger than FD_SETSIZE will result in undefined behavior. Moreover, POSIX requires fd to be a valid file descriptor.
本文来自博客园,作者:LiYanbin,转载请注明原文链接:https://www.cnblogs.com/stellar-liyanbin/p/18320295