mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +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:
parent
40dc37e30b
commit
5583156725
1 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue