diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 1fc58bd2f4f389db1065d7c9cf629c01233eb33a..f7e82db6dd9863e4d3a1565f28bf29340f2cfdf0 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;