diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-06-03 20:53:00 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-06-03 20:53:00 +0000 |
commit | 24d7159abd5e8a3fb5a75167e01b24230fb0874b (patch) | |
tree | 16bdf4ef0a62f645b5954de9a6bc137e38d79c83 /crypto/ocsp/ocsp_lib.c | |
parent | 7978dc989d09061913ce14a23a97c8c5f1821cdb (diff) |
Backport libcrypto audit: check return values of EVP functions instead
of assuming they will always suceed.
Diffstat (limited to 'crypto/ocsp/ocsp_lib.c')
-rw-r--r-- | crypto/ocsp/ocsp_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c index e92b86c060..a94dc838ee 100644 --- a/crypto/ocsp/ocsp_lib.c +++ b/crypto/ocsp/ocsp_lib.c @@ -124,7 +124,8 @@ OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, if (!(ASN1_OCTET_STRING_set(cid->issuerNameHash, md, i))) goto err; /* Calculate the issuerKey hash, excluding tag and length */ - EVP_Digest(issuerKey->data, issuerKey->length, md, &i, dgst, NULL); + if (!EVP_Digest(issuerKey->data, issuerKey->length, md, &i, dgst, NULL)) + goto err; if (!(ASN1_OCTET_STRING_set(cid->issuerKeyHash, md, i))) goto err; |