From aa0b816209ff94cc9e955c3a83f4b96626180baa Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 1 Jul 1998 22:01:29 +0000 Subject: [PATCH] chk_trans.c (krb5_check_transited_list): Fix use of an uninitalized variable; apparently the code was depending on the stack garbage being non-zero(!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10607 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 6 ++++++ src/lib/krb5/krb/chk_trans.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index b8467de3e..ae9c5e300 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,9 @@ +Wed Jul 1 17:59:26 1998 Theodore Y. Ts'o + + * chk_trans.c (krb5_check_transited_list): Fix use of an + uninitialized variable; apparently the code was depending + on the stack garbage being non-zero(!) + 1998-05-26 Theodore Ts'o * srv_rcache.c (krb5_get_server_rcache): diff --git a/src/lib/krb5/krb/chk_trans.c b/src/lib/krb5/krb/chk_trans.c index 979eb831a..ce994adfe 100644 --- a/src/lib/krb5/krb/chk_trans.c +++ b/src/lib/krb5/krb/chk_trans.c @@ -41,8 +41,7 @@ krb5_data *realm2; krb5_principal *tgs_list; if (!trans || !trans->data) return(0); - if (trans_length) - trans_length = trans->data[trans->length-1] ? + trans_length = trans->data[trans->length-1] ? trans->length : trans->length - 1; for (i = 0; i < trans_length; i++) -- 2.26.2