From a44b446d0486540101b191c6023317112c2ab26f Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 11 Oct 2006 04:54:00 +0000 Subject: [PATCH] Add bounds-checking assertions before automatic array reference git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18677 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/kdc_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index 071555bd9..b8ccce30d 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -699,6 +699,8 @@ add_to_transited(krb5_data *tgt_trans, krb5_data *new_trans, /* subrealm of the next field too, and we will catch */ /* it in a future iteration. */ + assert(nlst >= 0); + assert(nlst < sizeof(next)); if ((next[nlst] != '.') && (next[0] != '/') && (pl = subrealm(exp, realm))) { added = TRUE; -- 2.26.2