buffer overflow when number of open file descriptors >= FD_SETSIZE
Reported by Julien Tinnes, thanks to him!
Bip doesn't check if fd is equal or larger than FD_SETSIZE.
From select man page:
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.