From: Ezra Peisach Date: Tue, 25 Apr 1995 00:39:32 +0000 (+0000) Subject: Don't deref NULL pointer if profile_get_values returns NULL. X-Git-Tag: krb5-1.0-beta5~287 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=141612a7b67b1f22cd15b74f97eda99c1f35c585;p=krb5.git Don't deref NULL pointer if profile_get_values returns NULL. (i.e. when the profile file is missing) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5462 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index c13b4af41..e52844606 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 24 17:20:14 1995 Ezra Peisach + + * locate_kdc.c (krb5_locate_kdc): Don't deref NULL pointer + returned from profile_get_values if profile is not set. + Sat Apr 22 00:11:12 1995 Theodore Y. Ts'o (tytso@dcl) * Makefile.in, configure.in, t_std_conf.c: Add test program to diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index f245ad637..b13f65d1a 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -77,7 +77,7 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs) sec_udpport = 0; count = 0; - while (hostlist[count]) + while (hostlist && hostlist[count]) count++; if (count == 0) {