From 8af261ea1a12602e03e85bb7a386d45bb8ba7edb Mon Sep 17 00:00:00 2001 From: kris Date: Wed, 31 Oct 2007 23:19:36 +0000 Subject: [PATCH] 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) --- nmap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nmap.cc b/nmap.cc index 67d972eb9..1774f4bf3 100644 --- a/nmap.cc +++ b/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); }