If a null addresses is passed in to krb5_fcc_store_addrs, don't core dump
authorTheodore Tso <tytso@mit.edu>
Tue, 13 Dec 1994 20:43:58 +0000 (20:43 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 13 Dec 1994 20:43:58 +0000 (20:43 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4732 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/file/ChangeLog
src/lib/krb5/ccache/file/fcc_write.c

index 52cd41edaf7711c4186922446e3fb92f1b5ef181..3234f48d4038c75968e2fc20faf1a7b1450a89dd 100644 (file)
@@ -1,3 +1,8 @@
+Wed Dec  7 16:58:59 1994    <tytso@rsx-11.mit.edu>
+
+       * 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
index cbb092f6d430c56568202be48b4e1b70b0c924fe..2633bd5095ada3d98d77133d76ae1ac261f2ea33 100644 (file)
@@ -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);