1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Fix segfault when using service name wildcards with -p.

This commit is contained in:
dmiller
2023-06-16 18:20:16 +00:00
parent c13ce4536e
commit 2da490f847
3 changed files with 4 additions and 4 deletions

View File

@@ -132,14 +132,14 @@ static int nmap_protocols_init() {
/* Now we make sure our protocols don't have duplicates */
if (!status.second) {
if (o.debugging > 1) {
error("Protocol %d (%s) has duplicate number (%d) in protocols file %s", status.first->second.p_proto, ent.p_name, protno, filename);
error("Protocol %hu (%s) has duplicate number (%hu) in protocols file %s", status.first->second.p_proto, ent.p_name, protno, filename);
}
continue;
}
if (protocol_table[protno]) {
if (o.debugging > 1) {
error("Protocol %d (%s) has duplicate name (%s) in protocols file %s", protno, protocol_table[protno]->p_name, ent.p_name, filename);
error("Protocol %hu (%s) has duplicate name (%s) in protocols file %s", protno, protocol_table[protno]->p_name, ent.p_name, filename);
}
continue;
}