diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-05-13 19:02:48 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-05-13 19:02:48 +0000 |
commit | 1ac1c6f5bac6074cc660159f6a368e5690a2e4dc (patch) | |
tree | eca7d0d78ff53379ff003fe231d2ae0bc2176272 | |
parent | 13059db9b1c669f408f9ce51141929841b084943 (diff) | |
download | krb5-1ac1c6f5bac6074cc660159f6a368e5690a2e4dc.zip krb5-1ac1c6f5bac6074cc660159f6a368e5690a2e4dc.tar.gz krb5-1ac1c6f5bac6074cc660159f6a368e5690a2e4dc.tar.bz2 |
Pull up r24021 (fix negative enctypes in ccaches) to Luke's
camellia-ccm branch for testing purposes.
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/camellia-ccm@24022 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/ccache/cc_file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index 6af5afc..0dce768 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -595,8 +595,9 @@ krb5_fcc_read_keyblock(krb5_context context, krb5_ccache id, krb5_keyblock *keyb keyblock->magic = KV5M_KEYBLOCK; keyblock->contents = 0; + /* Enctype is signed, so sign-extend the 16-bit value we read. */ kret = krb5_fcc_read_ui_2(context, id, &ui2); - keyblock->enctype = ui2; + keyblock->enctype = (krb5_int16) ui2; CHECK(kret); if (data->version == KRB5_FCC_FVNO_3) { /* This works because the old etype is the same as the new enctype. */ |