Hi Simon,

On IRIX 6.5, the replacement getaddrinfo is used, and since the testsuite
exercises calling it will a hints = NULL pointer, it crashes in line 182.

Here is a proposed patch.


2007-03-25  Bruno Haible  <[EMAIL PROTECTED]>

        * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
        hints is NULL.

--- lib/getaddrinfo.c   21 Feb 2007 02:19:34 -0000      1.22
+++ lib/getaddrinfo.c   25 Mar 2007 22:03:03 -0000
@@ -179,7 +179,7 @@
       const char *proto =
        (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
 
-      if (!(hints->ai_flags & AI_NUMERICSERV))
+      if (hints == NULL || !(hints->ai_flags & AI_NUMERICSERV))
        /* FIXME: Use getservbyname_r if available. */
        se = getservbyname (servname, proto);
 



Reply via email to