Backport libcrypto audit: check return values of EVP functions instead

of assuming they will always suceed.
This commit is contained in:
Dr. Stephen Henson
2011-06-03 20:53:00 +00:00
parent 7978dc989d
commit 24d7159abd
31 changed files with 352 additions and 166 deletions

View File

@@ -412,8 +412,7 @@ int cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
*/
|| EVP_MD_pkey_type(EVP_MD_CTX_md(mtmp)) == nid)
{
EVP_MD_CTX_copy_ex(mctx, mtmp);
return 1;
return EVP_MD_CTX_copy_ex(mctx, mtmp);
}
chain = BIO_next(chain);
}