Set and use priv_size in the krb5_encrypt_block
authorPaul Park <pjpark@mit.edu>
Tue, 29 Aug 1995 18:31:15 +0000 (18:31 +0000)
committerPaul Park <pjpark@mit.edu>
Tue, 29 Aug 1995 18:31:15 +0000 (18:31 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6612 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/des/ChangeLog
src/lib/crypto/des/finish_key.c
src/lib/crypto/des/process_ky.c

index b04331584df5285395f46e1a14ef5848cbb1b504..d2d40e81efde61527f63002f4fafbada94afc68a 100644 (file)
@@ -1,3 +1,8 @@
+
+Tue Aug 29 13:29:19 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * process_key.c, finish_key.c - Set and use priv_size in the krb5_
+               encrypt_block.
+
 Thu Aug 24 18:08:42 1995  Ezra Peisach  <epeisach@kangaroo.mit.edu>
 
         * f_cksum.c: Change code to match prototypes. 
index b878097ffabc943a6542927ba0cc07f4d34b7d76..f9e3d3d7ac7da1f3483759541c709d74dc20c12a 100644 (file)
@@ -37,9 +37,10 @@ krb5_error_code
 mit_des_finish_key (eblock)
     krb5_encrypt_block FAR * eblock;
 {
-    memset((char *)eblock->priv, 0, sizeof(mit_des_key_schedule));
+    memset((char *)eblock->priv, 0, (size_t) eblock->priv_size);
     free(eblock->priv);
     eblock->priv = 0;
+    eblock->priv_size = 0;
     /* free/clear other stuff here? */
     return 0;
 }
index 201f0745a31fa7e011df2a9c08b7eb328a861c19..64cef57ad6e3d46bef60a38e2b42943279e6ff74 100644 (file)
@@ -64,6 +64,7 @@ mit_des_process_key (eblock, keyblock)
     default:
        eblock->key = (krb5_keyblock *) keyblock;
        eblock->priv = (krb5_pointer) schedule;
+       eblock->priv_size = (krb5_int32) sizeof(mit_des_key_schedule);
        return 0;
     }
 }