* fake-addrinfo.h (getaddrinfo) [__linux__]: Don't crash if hint is a null pointer
authorKen Raeburn <raeburn@mit.edu>
Thu, 28 Mar 2002 21:51:12 +0000 (21:51 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 28 Mar 2002 21:51:12 +0000 (21:51 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14304 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/fake-addrinfo.h

index 0f696ec5ce9bdfe0c769e13b84baf706d98bd220..c1bf46f2fcd7da13f4b014d2742c5cecde568b33 100644 (file)
@@ -3,6 +3,9 @@
        * k5-int.h: Include errno.h.
        * krb5.hin: Don't include errno.h.
 
+       * fake-addrinfo.h (getaddrinfo) [__linux__]: Don't crash if hint
+       is a null pointer.
+
 2002-03-27  Ken Raeburn  <raeburn@mit.edu>
 
        * fake-addrinfo.h [NEED_FAKE_GETADDRINFO]: Include errno.h.
index d1cfdd7b3eb9afa9f6c5b66d04a0005613eddf27..b7d0adad4033f378a0f903f244910345af6c0c87 100644 (file)
@@ -625,7 +625,7 @@ getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint,
        they get around to fixing it, add a compile-time or run-time
        check for the glibc version in use.  */
 #define COPY_FIRST_CANONNAME
-    if (name && (hint->ai_flags & AI_CANONNAME)) {
+    if (name && hint && (hint->ai_flags & AI_CANONNAME)) {
        struct hostent *hp;
        const char *name2 = 0;
        int i;