summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2002-03-28 21:51:12 +0000
committerKen Raeburn <raeburn@mit.edu>2002-03-28 21:51:12 +0000
commit4844aec9047e0b9547fcbdaf648282671c39439e (patch)
tree7b653d3a6493d30e32a327551e49a84a15290e32
parent9feed4ec13ae9369be7e924ccf21c22a105d63a1 (diff)
downloadkrb5-4844aec9047e0b9547fcbdaf648282671c39439e.tar.gz
krb5-4844aec9047e0b9547fcbdaf648282671c39439e.tar.xz
krb5-4844aec9047e0b9547fcbdaf648282671c39439e.zip
* 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
-rw-r--r--src/include/ChangeLog3
-rw-r--r--src/include/fake-addrinfo.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index 0f696ec5ce..c1bf46f2fc 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 <raeburn@mit.edu>
* fake-addrinfo.h [NEED_FAKE_GETADDRINFO]: Include errno.h.
diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h
index d1cfdd7b3e..b7d0adad40 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;