mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Let Nmap run if the nmap-service-probes file is empty. Patch by Ankur
Nandwani.
This commit is contained in:
parent
ef52f26769
commit
99a2835d7d
1 changed files with 9 additions and 8 deletions
|
|
@ -1126,14 +1126,14 @@ void parse_nmap_service_probe_file(AllProbes *AP, char *filename) {
|
|||
}
|
||||
}
|
||||
|
||||
assert(newProbe);
|
||||
if (newProbe->isNullProbe()) {
|
||||
assert(!AP->nullProbe);
|
||||
AP->nullProbe = newProbe;
|
||||
} else {
|
||||
AP->probes.push_back(newProbe);
|
||||
if (newProbe != NULL) {
|
||||
if (newProbe->isNullProbe()) {
|
||||
assert(!AP->nullProbe);
|
||||
AP->nullProbe = newProbe;
|
||||
} else {
|
||||
AP->probes.push_back(newProbe);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
|
||||
AP->compileFallbacks();
|
||||
|
|
@ -1280,7 +1280,8 @@ void AllProbes::compileFallbacks() {
|
|||
curr = probes.begin();
|
||||
|
||||
// The NULL probe is a special case:
|
||||
nullProbe->fallbacks[0] = nullProbe;
|
||||
if (nullProbe != NULL)
|
||||
nullProbe->fallbacks[0] = nullProbe;
|
||||
|
||||
while (curr != probes.end()) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue