Copy sizeof(mit_des_cblock), not sizeof(key) so that we are getting the
authorRichard Basch <probe@mit.edu>
Sat, 11 May 1996 21:38:18 +0000 (21:38 +0000)
committerRichard Basch <probe@mit.edu>
Sat, 11 May 1996 21:38:18 +0000 (21:38 +0000)
full DES key.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7979 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/ChangeLog
src/lib/des425/new_rnd_key.c

index f4c4d07ec50d0075222b40617947b48fef9cf757..8ddfc2b7642a4441b822ea6899467feabd581e6f 100644 (file)
@@ -1,3 +1,8 @@
+Sat May 11 17:36:26 EDT 1996  Richard Basch  <basch@lehman.com>
+
+       * new_rnd_key.c: Use sizeof(mit_des_cblock) instead of sizeof(key)
+       so that we copy the full DES key instead of only 4 bytes.
+
 Thu May  2 18:44:02 1996  Richard Basch  <basch@lehman.com>
 
        * random_key.c new_rnd_key.c:
index 066b56895537b88fc8ab6bdbd316f783af1dda27..84cbc1c129fa76dca13de919779cd55d4d65d516 100644 (file)
@@ -48,7 +48,7 @@ des_new_random_key(key)
     kret = mit_des_random_key(NULL, des425_random_state, &keyblock);
     if (kret) return kret;
     
-    memcpy(key, keyblock->contents, sizeof(key));
+    memcpy(key, keyblock->contents, sizeof(mit_des_cblock));
     krb5_free_keyblock(NULL, keyblock);
     return 0;
 }