From 6a8bbe5d1448b291fb99f1cf5adb7fbfb11cb29b Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 7 Jul 1998 20:59:38 +0000 Subject: [PATCH] * chk_trans.c: Fix up previous fix; short-circuit out when trans->length == 0. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10622 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/chk_trans.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index ae9c5e300..2a50ef153 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 7 16:59:03 1998 Tom Yu + + * 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 * chk_trans.c (krb5_check_transited_list): Fix use of an diff --git a/src/lib/krb5/krb/chk_trans.c b/src/lib/krb5/krb/chk_trans.c index ce994adfe..c2ac716c8 100644 --- a/src/lib/krb5/krb/chk_trans.c +++ b/src/lib/krb5/krb/chk_trans.c @@ -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') { -- 2.26.2