[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Thu Feb 11 17:13:26 UTC 2016
The branch master has been updated
via 84c15091ec4b694d7a10a3d0fa1c42a30e9d1b21 (commit)
from 1407f856ab790f8028db1ecfb354d64bfb8ca054 (commit)
- Log -----------------------------------------------------------------
commit 84c15091ec4b694d7a10a3d0fa1c42a30e9d1b21
Author: Rich Salz <rsalz at akamai.com>
Date: Thu Jan 21 14:53:18 2016 -0500
Fix GH 327.
Valgrind complains about using unitialized memory. So call
OPENSSL_zalloc, not malloc.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/digest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 1fc58bd..f7e82db 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -229,7 +229,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
ctx->digest = type;
if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
ctx->update = type->update;
- ctx->md_data = OPENSSL_malloc(type->ctx_size);
+ ctx->md_data = OPENSSL_zalloc(type->ctx_size);
if (ctx->md_data == NULL) {
EVPerr(EVP_F_EVP_DIGESTINIT_EX, ERR_R_MALLOC_FAILURE);
return 0;
More information about the openssl-commits
mailing list