1
0
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:
kris
2007-11-15 23:01:32 +00:00
parent 8de1fda6b3
commit 2fbed3e856

View File

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