1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 07:01:32 +00:00

Check for sd > FD_SETSIZE before it is unrecoverable. Fixes #1857

This commit is contained in:
dmiller
2022-09-29 00:13:10 +00:00
parent de9f84d080
commit b5dd2956dd
3 changed files with 56 additions and 6 deletions

View File

@@ -327,8 +327,7 @@ bool GroupScanStats::sendOK(struct timeval *when) const {
if (when)
TIMEVAL_MSEC_ADD(*when, USI->now, 1000);
if ((USI->scantype == CONNECT_SCAN || USI->ptech.connecttcpscan)
&& CSI->numSDs >= CSI->maxSocketsAllowed)
if (CSI && !CSI->sendOK())
return false;
/* We need to stop sending if it has been a long time since