Fix pointer aliasing problem between newkey and authent->subkey
authorTheodore Tso <tytso@mit.edu>
Sat, 20 Aug 1994 05:48:18 +0000 (05:48 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 20 Aug 1994 05:48:18 +0000 (05:48 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4204 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/mk_req_ext.c

index 2fd74813a5472186018ef6413dc2f7a67b8a2058..215005df07f62ad84e22dcea752fb1d1ad32fbaf 100644 (file)
@@ -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
index 9f3279b030b299fbdb9adf3bb10f21f74e78c3c9..39b8f121cd2a347201fd98e58b2c21249a05759a 100644 (file)
@@ -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;