From 8b18e348db934a93c60af8d121167d6d3cdbb424 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 28 Jul 2016 16:19:49 +0000 Subject: [PATCH] Avoid array overrun with -PO when probes time out --- scan_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan_engine.cc b/scan_engine.cc index a82c6cbda..e2d7c8c66 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -1473,7 +1473,7 @@ static int get_next_target_probe(UltraScanInfo *USI, HostScanStats *hss, pspec->pd.sctp.chunktype = SCTP_INIT; return 0; } - if (USI->ptech.rawprotoscan) { + if (USI->ptech.rawprotoscan && hss->next_protoportpingidx < USI->ports->proto_ping_count) { pspec->type = PS_PROTO; pspec->proto = USI->ports->proto_ping_ports[hss->next_protoportpingidx++]; return 0;