mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Check for sd > FD_SETSIZE before it is unrecoverable. Fixes #1857
This commit is contained in:
@@ -244,11 +244,17 @@ public:
|
||||
was in the list, false if you tried to clear an sd that wasn't
|
||||
there in the first place. */
|
||||
bool clearSD(int sd);
|
||||
/* Try to get a socket that's good for select(). Return true if it worked;
|
||||
* false if it didn't. */
|
||||
bool sendOK();
|
||||
int maxValidSD; /* The maximum socket descriptor in any of the fd_sets */
|
||||
fd_set fds_read;
|
||||
fd_set fds_write;
|
||||
fd_set fds_except;
|
||||
int numSDs; /* Number of socket descriptors being watched */
|
||||
int getSocket();
|
||||
private:
|
||||
int nextSD;
|
||||
int maxSocketsAllowed; /* No more than this many sockets may be created @once */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user