From 41be1429e9cc2de1746c5d20a30e9feb81386ca2 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Mon, 7 Aug 1995 18:16:56 +0000 Subject: [PATCH] Fix another big-endian problem git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6436 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 5 +++++ src/lib/kdb/decrypt_key.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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, -- 2.26.2