summaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-12-09 15:01:39 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-12-09 15:01:39 +0000
commit338a61b94e39e3db628ff862853255b8d71615ee (patch)
tree1975d51ad1e192d9aa0b6621447bebc3d246e277 /crypto/evp/digest.c
parente4bcadb3021e875f94b4a37b0edd18a83b7569a8 (diff)
Add patch to crypto/evp which didn't apply from PR#2124
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index d6abcfe1d6..bd520456b1 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -203,6 +203,12 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
{
ctx->update = type->update;
ctx->md_data=OPENSSL_malloc(type->ctx_size);
+ if (ctx->md_data == NULL)
+ {
+ EVPerr(EVP_F_EVP_DIGESTINIT_EX,
+ ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
}
}
#ifndef OPENSSL_NO_ENGINE