From: Paul Park Date: Mon, 7 Aug 1995 18:16:56 +0000 (+0000) Subject: Fix another big-endian problem X-Git-Tag: krb5-1.0-beta6~1388 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41be1429e9cc2de1746c5d20a30e9feb81386ca2;p=krb5.git Fix another big-endian problem git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6436 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 1014f5925..7adf8e28a 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,4 +1,9 @@ +Mon Aug 7 14:15:59 EDT 1995 Paul Park (pjpark@mit.edu) + * decrypt_key.c - Deserialize key length into a 16 bit integer, then + jam it into the keyblock. + + Mon Aug 7 13:05:53 EDT 1995 Paul Park (pjpark@mit.edu) * kdb_cpw.c(add_key_rnd) - Manually initialize krbtgt_princ.data to point to krbtgt_princ_entries since some compilers do not diff --git a/src/lib/kdb/decrypt_key.c b/src/lib/kdb/decrypt_key.c index 25855162b..9a46e845e 100644 --- a/src/lib/kdb/decrypt_key.c +++ b/src/lib/kdb/decrypt_key.c @@ -41,6 +41,7 @@ krb5_dbekd_decrypt_key_data(context, eblock, key_data, keyblock, keysalt) krb5_keysalt * keysalt; { krb5_error_code retval; + krb5_int16 tmplen; krb5_octet * ptr; keyblock->magic = KV5M_KEYBLOCK; @@ -54,8 +55,9 @@ krb5_dbekd_decrypt_key_data(context, eblock, key_data, keyblock, keysalt) keyblock->length = 0; ptr = key_data->key_data_contents[0]; - krb5_kdb_decode_int16(ptr, keyblock->length); + krb5_kdb_decode_int16(ptr, tmplen); ptr += 2; + keyblock->length = (int) tmplen; if ((retval = krb5_decrypt(context, (krb5_pointer) ptr, (krb5_pointer)keyblock->contents, key_data->key_data_length[0] - 2,