From: Theodore Tso Date: Tue, 13 Dec 1994 20:43:58 +0000 (+0000) Subject: If a null addresses is passed in to krb5_fcc_store_addrs, don't core dump X-Git-Tag: krb5-1.0-beta5~921 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0086bc37bb8de9f6b8837ef99ce1b06196fd7339;p=krb5.git If a null addresses is passed in to krb5_fcc_store_addrs, don't core dump git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4732 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog index 52cd41eda..3234f48d4 100644 --- a/src/lib/krb5/ccache/file/ChangeLog +++ b/src/lib/krb5/ccache/file/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 7 16:58:59 1994 + + * fcc_write.c (krb5_fcc_store_addrs): If a null addresses is + passed in, don't core dump. + Fri Nov 18 17:22:51 1994 Theodore Y. Ts'o (tytso@dcl) * fcc_read.c (krb5_fcc_read_principal): Fix to return correct diff --git a/src/lib/krb5/ccache/file/fcc_write.c b/src/lib/krb5/ccache/file/fcc_write.c index cbb092f6d..2633bd509 100644 --- a/src/lib/krb5/ccache/file/fcc_write.c +++ b/src/lib/krb5/ccache/file/fcc_write.c @@ -119,9 +119,11 @@ krb5_fcc_store_addrs(id, addrs) krb5_int32 i, length = 0; /* Count the number of components */ - temp = addrs; - while (*temp++) - length += 1; + if (addrs) { + temp = addrs; + while (*temp++) + length += 1; + } ret = krb5_fcc_store_int32(id, length); CHECK(ret);