From 18797d20ba8de3f5fcac0b41592a0f3141309710 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Wed, 16 Jul 1997 03:45:23 +0000 Subject: [PATCH] Check for NULL return from gethostent. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2362 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/send_to_kdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/krb5/send_to_kdc.c b/lib/krb5/send_to_kdc.c index 5a1a68791..459e1380a 100644 --- a/lib/krb5/send_to_kdc.c +++ b/lib/krb5/send_to_kdc.c @@ -76,6 +76,8 @@ krb5_sendto_kdc (krb5_context context, if (colon) *colon = '\0'; hostent = gethostbyname (p); + if(hostent == NULL) + continue; if (colon) *colon++ = ':'; while ((addr = *hostent->h_addr_list++)) {