On Mon 2005.06.27 at 12:21 -0400, Okan Demirmen wrote:
> On Mon 2005.06.27 at 15:35 +0200, [EMAIL PROTECTED] wrote:
> > Nmap-cmd was used htis way: nmap -O -v -v -v -T5 -P0 -sV -sT -oN 9grid
> > www.9grid.de.
> > But it core-Dumps also in other cases that is just the ?ast case I noticed
> > and because it sucks a lot I provided the GDB-Output.
> 
> for some reason, it is the "-oN" flag.
> 
> fyi, this does not core on i386 or sparc64, but i've verified that it
> does on amd64. i don't have tons of time now, but i'll look into soon.
> don't use -oN for now ;)

thank michael coulter.

looks like this has been fixed in nmap. this is a patch pulled from an
upcoming nmap release. boy, i wish everyone would provide public cvs
access...of course, when the new release comes out the port will be
fully updated (in -current of course).

--- output.cc.orig      Mon Jun 27 20:17:33 2005
+++ output.cc   Mon Jun 27 20:18:04 2005
@@ -525,7 +525,9 @@ void log_write(int logt, const char *fmt
 
   va_start(ap, fmt);
   if (l & LOG_STDOUT) {
+    va_start(ap, fmt);
     vfprintf(o.nmap_stdout, fmt, ap);
+    va_end(ap);
     l-=LOG_STDOUT;
   }
   if (l & LOG_SKID_NOXLT) { skid=0; l -= LOG_SKID_NOXLT; l |= LOG_SKID; }
@@ -534,7 +536,9 @@ void log_write(int logt, const char *fmt
     {
       if (!o.logfd[i] || !(l&1)) continue;
       while(1) {
+       va_start(ap, fmt);
        rc = vsnprintf(buf,bufsz, fmt, ap);
+       va_end(ap);
        if (rc >= 0 && rc < bufsz)
          break; // Successful
        // D'oh!  Apparently not enough space - lets try a bigger buffer

Reply via email to