From: Ken Raeburn Date: Thu, 28 Mar 2002 21:51:12 +0000 (+0000) Subject: * fake-addrinfo.h (getaddrinfo) [__linux__]: Don't crash if hint is a null pointer X-Git-Tag: krb5-1.3-alpha1~807 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4844aec9047e0b9547fcbdaf648282671c39439e;p=krb5.git * fake-addrinfo.h (getaddrinfo) [__linux__]: Don't crash if hint is a null pointer git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14304 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 0f696ec5c..c1bf46f2f 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -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 * fake-addrinfo.h [NEED_FAKE_GETADDRINFO]: Include errno.h. diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index d1cfdd7b3..b7d0adad4 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -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;