Nmap Development mailing list archives

Re: MinGW patch, getaddrinfo


From: David Fifield <david () bamsoftware com>
Date: Thu, 4 Sep 2008 08:51:45 -0600

On Thu, Sep 04, 2008 at 03:33:23PM +0200, Gisle Vanem wrote:
It looks good. Is _MSC_VER the most reliable way to check for the
existence of the header? I ask only because I found
http://www.tremfusion.net/trac/changeset/443 which uses __MINGW32__ to
do the same thing.

I attached nbase-wspiapi-mingw.diff that does what you ask in a
different fashion, defining HAVE_WSPIAPI_H based on the value of
_MSC_VER. Please try it and if it works I'll apply it.

It looks good. Please commit.

Done.

I see two other places where getaddrinfo is used, so I'm curious why
only this one needs to be patched.
And what happens when you script scan one of the targets that requires
the above patch? There is a call to getaddrinfo in nse_nsock too.

I failed to follow the codepath into those other getaddrinfo() calls.
Hint for you; patch nbase/getaddrinfo.c to set rc==0 and result==NULL
and test. 

I patched all three places, though I want to understand more about the
problem. Did you get a crash with every scan you used to run, or only
against targets identified by host name rather than IP address, or only
IPv6 hosts, or what?

David

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


Current thread: