From ab9421000181bc531c62a827d972137c62b761be Mon Sep 17 00:00:00 2001 From: Paul Park Date: Tue, 29 Aug 1995 18:31:15 +0000 Subject: [PATCH] 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 --- src/lib/crypto/des/ChangeLog | 5 +++++ src/lib/crypto/des/finish_key.c | 3 ++- src/lib/crypto/des/process_ky.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) 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; } } -- 2.26.2