mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Handle 'unknown' service name in -p. Fixes #2658
This commit is contained in:
parent
9adda8c0f3
commit
c13ce4536e
2 changed files with 4 additions and 0 deletions
|
|
@ -285,6 +285,8 @@ int addportsfromservmask(const char *mask, u8 *porttbl, int range_type) {
|
|||
|
||||
for (i = service_table.begin(); i != service_table.end(); i++) {
|
||||
const service_node& current = i->second;
|
||||
if (!current.s_name)
|
||||
continue;
|
||||
if (wildtest(mask, current.s_name)) {
|
||||
if ((range_type & SCAN_TCP_PORT) && strcmp(current.s_proto, "tcp") == 0) {
|
||||
porttbl[current.s_port] |= SCAN_TCP_PORT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue