Let Nmap run if the nmap-service-probes file is empty. Patch by Ankur

Nandwani.
This commit is contained in:
david 2009-09-07 22:03:27 +00:00
parent ef52f26769
commit 99a2835d7d

View file

@ -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()) {