mirror of
https://github.com/nmap/nmap.git
synced 2026-01-10 00:19:02 +00:00
Fixing a bug in TargetGroup::parse_expr(). A specification like '192.168.1.-4' would actually cause Nmap to treat it like '192.168.1.-'. Found with Coverity, CID 2.
This commit is contained in:
@@ -250,7 +250,7 @@ int TargetGroup::parse_expr(const char * const target_expr, int af) {
|
||||
if (*addy[i] == '*') { start = 0; end = 255; }
|
||||
else if (*addy[i] == '-') {
|
||||
start = 0;
|
||||
if (!addy[i] + 1) end = 255;
|
||||
if (!(addy[i] + 1)) end = 255;
|
||||
else end = atoi(addy[i]+ 1);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user