From: Paul Park Date: Tue, 29 Aug 1995 18:31:15 +0000 (+0000) Subject: Set and use priv_size in the krb5_encrypt_block X-Git-Tag: krb5-1.0-beta6~1244 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab9421000181bc531c62a827d972137c62b761be;p=krb5.git Set and use priv_size in the krb5_encrypt_block git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6612 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/des/ChangeLog b/src/lib/crypto/des/ChangeLog index b04331584..d2d40e81e 100644 --- a/src/lib/crypto/des/ChangeLog +++ b/src/lib/crypto/des/ChangeLog @@ -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 * f_cksum.c: Change code to match prototypes. diff --git a/src/lib/crypto/des/finish_key.c b/src/lib/crypto/des/finish_key.c index b878097ff..f9e3d3d7a 100644 --- a/src/lib/crypto/des/finish_key.c +++ b/src/lib/crypto/des/finish_key.c @@ -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; } diff --git a/src/lib/crypto/des/process_ky.c b/src/lib/crypto/des/process_ky.c index 201f0745a..64cef57ad 100644 --- a/src/lib/crypto/des/process_ky.c +++ b/src/lib/crypto/des/process_ky.c @@ -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; } }