From bafb7b88aec5f9d98ce9596da5680adcb7ff09bb Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 21 Jul 2021 15:46:38 +0000 Subject: [PATCH] Code analysis thinks this could be null; assert it --- scan_engine.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/scan_engine.cc b/scan_engine.cc index 51e713e74..886ba484f 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -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 */