From d136e5fd1881a14ab95751c2f50ea4345ca13a18 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 20 Aug 1994 05:48:18 +0000 Subject: [PATCH] Fix pointer aliasing problem between newkey and authent->subkey git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4204 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/mk_req_ext.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 2fd74813a..215005df0 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 20 01:43:43 1994 Theodore Y. Ts'o (tytso at tsx-11) + + * mk_req_ext.c (krb5_generate_authenticator): Fix pointer aliasing + problem between newkey and authent->subkey. + Wed Aug 17 17:58:22 1994 Theodore Y. Ts'o (tytso at tsx-11) * encode_kdc.c (krb5_encode_kdc_rep): Pass in to diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index 9f3279b03..39b8f121c 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -237,8 +237,16 @@ krb5_keyblock *key; krb5_int32 seq_number; krb5_authdata **authorization; { + krb5_error_code retval; + authent->client = client; authent->checksum = (krb5_checksum *)cksum; + if (key) { + retval = krb5_copy_keyblock(key, &authent->subkey); + if (retval) + return retval; + } else + authent->subkey = 0; authent->subkey = key; authent->seq_number = seq_number; authent->authorization_data = authorization; -- 2.26.2