From: Paul Park Date: Thu, 3 Aug 1995 16:05:59 +0000 (+0000) Subject: Fix krb5_decode_princ_contents() X-Git-Tag: krb5-1.0-beta6~1430 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6b1de3c0a56234c79242ddb4ec40440cf56db38;p=krb5.git Fix krb5_decode_princ_contents() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6393 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/kdb_xdr.c b/src/lib/kdb/kdb_xdr.c index bae6fea8f..0f924f79e 100644 --- a/src/lib/kdb/kdb_xdr.c +++ b/src/lib/kdb/kdb_xdr.c @@ -549,6 +549,7 @@ krb5_decode_princ_contents(context, content, entry) } memcpy((*tl_data)->tl_data_contents,nextloc,(*tl_data)->tl_data_length); nextloc += (*tl_data)->tl_data_length; + tl_data = &((*tl_data)->tl_data_next); } /* key_data is an array */ @@ -572,7 +573,7 @@ krb5_decode_princ_contents(context, content, entry) *(((krb5_octet *)(&key_data->key_data_kvno)) + 1) = *nextloc++; /* key_data_ver determins number of elements and how to unparse them. */ - if (key_data->key_data_ver < KRB5_KDB_V1_KEY_DATA_ARRAY) { + if (key_data->key_data_ver <= KRB5_KDB_V1_KEY_DATA_ARRAY) { for (j = 0; j < key_data->key_data_ver; j++) { if ((sizeleft -= 4) < 0) { retval = KRB5_KDB_TRUNCATED_RECORD;