diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f7c56e6f0..5fcda75dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-03-27 Corinna Vinschen + + * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before + checking its content. + 2009-03-27 Corinna Vinschen * fhandler.h (class fhandler_fifo): Rename read/write methods to diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index c251dea26..d8294513e 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -4213,6 +4213,7 @@ cygwin_getaddrinfo (const char *hostname, const char *servname, convert the returned IPv4 addresses into v4-in-v6 entries. This is done in ga_dup if the v4mapped flag is set. */ if (!wincap.supports_all_posix_ai_flags () + && hints && hints->ai_family == AF_INET6 && (hints->ai_flags & AI_V4MAPPED) && (ret == EAI_NODATA || ret == EAI_NONAME