Fix another big-endian problem
authorPaul Park <pjpark@mit.edu>
Mon, 7 Aug 1995 18:16:56 +0000 (18:16 +0000)
committerPaul Park <pjpark@mit.edu>
Mon, 7 Aug 1995 18:16:56 +0000 (18:16 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6436 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/ChangeLog
src/lib/kdb/decrypt_key.c

index 1014f5925e00d40689d6812961fe5355d7071d58..7adf8e28ae5ce9a772e8f4136750d25fc4e40d98 100644 (file)
@@ -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
index 25855162b3495b2cf5e5fa6f854a68953e546e4d..9a46e845e94e26cb1a6520a916e3af9944ef1796 100644 (file)
@@ -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,