diff --git a/lib/cipher_funcs.c b/lib/cipher_funcs.c index 911e1c6b..ca538ae0 100644 --- a/lib/cipher_funcs.c +++ b/lib/cipher_funcs.c @@ -262,6 +262,10 @@ rij_encrypt(unsigned char *in, size_t in_len, ondx += in_len+pad_val; + zero_buf((char *)ctx.key, RIJNDAEL_MAX_KEYSIZE); + zero_buf((char *)ctx.iv, RIJNDAEL_BLOCKSIZE); + zero_buf((char *)ctx.salt, SALT_LEN); + return(ondx - out); } @@ -312,6 +316,10 @@ rij_decrypt(unsigned char *in, size_t in_len, *ondx = '\0'; + zero_buf((char *)ctx.key, RIJNDAEL_MAX_KEYSIZE); + zero_buf((char *)ctx.iv, RIJNDAEL_BLOCKSIZE); + zero_buf((char *)ctx.salt, SALT_LEN); + return(ondx - out); }