* chk_trans.c: Fix up previous fix; short-circuit out when
authorTom Yu <tlyu@mit.edu>
Tue, 7 Jul 1998 20:59:38 +0000 (20:59 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 7 Jul 1998 20:59:38 +0000 (20:59 +0000)
trans->length == 0.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10622 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/chk_trans.c

index ae9c5e30082efac819df38eb02c6f8c19229bf73..2a50ef153da29174d6e1dd5a2006e4aad7e0d903 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jul  7 16:59:03 1998  Tom Yu  <tlyu@mit.edu>
+
+       * chk_trans.c: Fix up previous fix; short-circuit out when
+       trans->length == 0.
+
 Wed Jul  1 17:59:26 1998  Theodore Y. Ts'o  <tytso@mit.edu>
 
        * chk_trans.c (krb5_check_transited_list): Fix use of an
index ce994adfef973e789809b62f0a0d1f701c9e48da..c2ac716c880f096c2072c81b0ae33a208eb77d22 100644 (file)
@@ -40,9 +40,10 @@ krb5_data      *realm2;
   krb5_error_code retval = 0;
   krb5_principal  *tgs_list;
 
-  if (!trans || !trans->data)  return(0);
+  if (trans == NULL || trans->data == NULL || trans->length == 0)
+    return(0);
   trans_length = trans->data[trans->length-1] ?
-      trans->length : trans->length - 1;
+    trans->length : trans->length - 1;
 
   for (i = 0; i < trans_length; i++)
     if (trans->data[i] == '\0') {