From 2b6a34e13251dd5dc600484b2fc933e7d953eeac Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Fri, 21 Aug 2009 07:43:29 -0700 Subject: [PATCH] allocate cleam memory for cipher to play with --- lib/hcrypto/evp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hcrypto/evp.c b/lib/hcrypto/evp.c index 96ed8a869..006db3593 100644 --- a/lib/hcrypto/evp.c +++ b/lib/hcrypto/evp.c @@ -743,7 +743,7 @@ EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE *engine, ctx->cipher = c; ctx->key_len = c->key_len; - ctx->cipher_data = malloc(c->ctx_size); + ctx->cipher_data = calloc(1, c->ctx_size); if (ctx->cipher_data == NULL && c->ctx_size != 0) return 0;