1
0
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:
kris
2007-10-31 23:19:36 +00:00
parent e52b86d3ea
commit 8af261ea1a

View File

@@ -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);
}