Nmap Development mailing list archives

Re: nmap 3.93 dumps core when exclude cidr netmask is less than 32


From: Fyodor <fyodor () insecure org>
Date: Sun, 27 Nov 2005 15:14:48 -0800

On Wed, Nov 23, 2005 at 05:12:23PM +0000, Adam Ulmer wrote:
--- targets.cc  (revision 2891)
+++ targets.cc  (working copy)
@@ -1733,7 +1733,7 @@
         }
        else {
          exclude_group[i++].rewind();
-         continue;
+         break;
        }
       }
       /* For ranges we need to be a little more slick, if we don't
       find a match

[...]

I tried replacing the continue with a break, but I still get a core dump
in the same place.

You're right -- I just noticed an exclude_group[i++].rewind() about 30
lines down.  So the one in the else statement can be removed.  Here is
my new patch:

--- targets.cc  (revision 2891)
+++ targets.cc  (working copy)
@@ -1732,8 +1732,7 @@
          return 1;
         }
        else {
-         exclude_group[i++].rewind();
-         continue;
+         break;
        }
       } 
       /* For ranges we need to be a little more slick, if we don't find a match

Please let me know if you still have problems with this one.  It seems to work fine with me, but I couldn't reproduce 
the initial crash either.

Cheers,
-F


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev


Current thread: