+2007-03-25 Bruno Haible <bruno@clisp.org>
+
+ * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
+ hints is NULL.
+
2007-03-25 Bruno Haible <bruno@clisp.org>
* lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
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);