Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-03-27 18:10:18 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-03-27 18:10:18 +0300
commite5d5e036fddd3da07ab445c75ece29cd5259e43f (patch)
treec2885feba428513b86e5080cca6148e0d867ce2d
parent52e26dc2ab6a0c3138c76586385a5dece5dcf8a4 (diff)
* net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
checking its content.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/net.cc1
2 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f7c56e6f0..5fcda75dd 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
+ * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
+ checking its content.
+
+2009-03-27 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler.h (class fhandler_fifo): Rename read/write methods to
raw_read/raw_write.
* fhandler_fifo.cc: Ditto.
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