From 4dd88df8c309298ce8789be1d4f119082a3f89b6 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 13 Dec 1994 20:44:47 +0000 Subject: [PATCH] If a null addresses is passed in to krb5_scc_store_addrs, don't core dump git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4733 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/stdio/ChangeLog | 5 +++++ src/lib/krb5/ccache/stdio/scc_write.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog index 576b44ffb..13a9b22a4 100644 --- a/src/lib/krb5/ccache/stdio/ChangeLog +++ b/src/lib/krb5/ccache/stdio/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 13 15:42:50 1994 + + * scc_write.c (krb5_scc_store_addrs): If a null addresses is + passed in, don't core dump. + Fri Nov 18 14:47:33 1994 Theodore Y. Ts'o (tytso@dcl) * scc-proto.h, scc.h, scc_maybe.c (krb5_scc_open_file), scc_nseq.c diff --git a/src/lib/krb5/ccache/stdio/scc_write.c b/src/lib/krb5/ccache/stdio/scc_write.c index 346db57ec..db6015dd5 100644 --- a/src/lib/krb5/ccache/stdio/scc_write.c +++ b/src/lib/krb5/ccache/stdio/scc_write.c @@ -119,9 +119,11 @@ krb5_scc_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_scc_store_int32(id, length); CHECK(ret); -- 2.26.2