summaryrefslogtreecommitdiff
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-06-03 20:53:00 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-06-03 20:53:00 +0000
commit24d7159abd5e8a3fb5a75167e01b24230fb0874b (patch)
tree16bdf4ef0a62f645b5954de9a6bc137e38d79c83 /crypto/x509v3
parent7978dc989d09061913ce14a23a97c8c5f1821cdb (diff)
downloadopenssl-new-24d7159abd5e8a3fb5a75167e01b24230fb0874b.tar.gz
Backport libcrypto audit: check return values of EVP functions instead
of assuming they will always suceed.
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_skey.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_skey.c b/crypto/x509v3/v3_skey.c
index 202c9e4896..0a984fbaa8 100644
--- a/crypto/x509v3/v3_skey.c
+++ b/crypto/x509v3/v3_skey.c
@@ -129,7 +129,8 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
goto err;
}
- EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL);
+ if (!EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL))
+ goto err;
if(!M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen)) {
X509V3err(X509V3_F_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE);