From b6dcdbfc94c482f6c15ba725754fc9e827e41851 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 23 Sep 2009 23:43:49 +0000 Subject: Audit libcrypto for unchecked return values: fix all cases enountered --- crypto/evp/p_verify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crypto/evp/p_verify.c') diff --git a/crypto/evp/p_verify.c b/crypto/evp/p_verify.c index 8db46412f3..6e2e70b382 100644 --- a/crypto/evp/p_verify.c +++ b/crypto/evp/p_verify.c @@ -71,8 +71,10 @@ int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, MS_STATIC EVP_MD_CTX tmp_ctx; EVP_MD_CTX_init(&tmp_ctx); - EVP_MD_CTX_copy_ex(&tmp_ctx,ctx); - EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len); + if (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx)) + goto err; + if (!EVP_DigestFinal_ex(&tmp_ctx,&(m[0]),&m_len)) + goto err; EVP_MD_CTX_cleanup(&tmp_ctx); if (ctx->digest->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) -- cgit v1.2.3