mirror of
https://github.com/nmap/nmap.git
synced 2025-12-28 02:19:04 +00:00
whoops, adding new limits for protocol numbers (0-255) passed to -PO. This didn't cause a crash or anything, just a wraparound in the protocol field (e.g. passing 258 caused 2 to be used)
This commit is contained in:
2
nmap.cc
2
nmap.cc
@@ -1084,7 +1084,7 @@ int nmap_main(int argc, char *argv[]) {
|
||||
} else if (*optarg == 'O') {
|
||||
o.pingtype |= PINGTYPE_PROTO;
|
||||
if (isdigit((int) *(optarg+1))) {
|
||||
o.num_ping_protoprobes = numberlist2array(optarg+1, o.ping_protoprobes, sizeof(o.ping_protoprobes), &proberr);
|
||||
o.num_ping_protoprobes = numberlist2array(optarg+1, o.ping_protoprobes, sizeof(o.ping_protoprobes), &proberr, 0, 255);
|
||||
if (o.num_ping_protoprobes < 0) {
|
||||
fatal("Bogus argument to -PO: %s", proberr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user