1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-30 10:09:03 +00:00

Check for an empty host batch before ping scanning.

This was a regression related to target deferral. It caused a null
pointer dereference if all your targets failed to resolve or were
excluded.
This commit is contained in:
david
2013-03-01 02:10:53 +00:00
parent 40dc37e30b
commit 5583156725

View File

@@ -598,6 +598,9 @@ static void refresh_hostbatch(HostGroupState *hs, const addrset *exclude_group,
hs->hostbatch[hs->current_batch_sz++] = t;
}
if (hs->current_batch_sz == 0)
return;
/* OK, now we have our complete batch of entries. The next step is to
randomize them (if requested) */
if (hs->randomize) {