mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Added error message for improperly formatted port/protocol string.
Thanks to David for finding this problem.
This commit is contained in:
parent
bbc2196eea
commit
29d2b20c98
1 changed files with 4 additions and 1 deletions
5
nmap.cc
5
nmap.cc
|
|
@ -2321,7 +2321,10 @@ static void getpts_aux(const char *origexpr, int nested, u8 *porttbl, int range_
|
|||
/* Find the next range */
|
||||
while(isspace((int) *current_range)) current_range++;
|
||||
|
||||
if (*current_range == ']') return;
|
||||
if (*current_range == ']') {
|
||||
if (!nested) fatal("Unexpected ] character in port/protocol specification");
|
||||
return;
|
||||
}
|
||||
|
||||
if (*current_range && *current_range != ',') {
|
||||
fatal("Error #488: Your port specifications are illegal. Example of proper form: \"%s\"", syntax_example);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue