1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00

Code analysis thinks this could be null; assert it

This commit is contained in:
dmiller
2021-07-21 15:46:38 +00:00
parent 8a6e1fbb6d
commit bafb7b88ae

View File

@@ -1167,6 +1167,7 @@ int UltraScanInfo::removeCompletedHosts() {
nxt = hostI;
nxt++;
hss = *hostI;
assert(hss);
// Don't bother checking timedOut for discovery scans or if the target is already completed.
if (hss->completed() || (timedout = (!ping_scan) && hss->target->timedOut(&now)) != false) {
/* A host to remove! First adjust nextI appropriately */