diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-24 01:43:49 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-24 01:43:49 +0200 |
commit | b6dcdbfc94c482f6c15ba725754fc9e827e41851 (patch) | |
tree | 9fec84d4564530bc97b42d56e01a64abb96adac3 /crypto/evp/p_verify.c | |
parent | Add more return value checking attributes to evp.h and hmac.h (diff) | |
download | openssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.tar.xz openssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.zip |
Audit libcrypto for unchecked return values: fix all cases enountered
Diffstat (limited to 'crypto/evp/p_verify.c')
-rw-r--r-- | crypto/evp/p_verify.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) |