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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user