diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-23 23:43:49 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-23 23:43:49 +0000 |
commit | b6dcdbfc94c482f6c15ba725754fc9e827e41851 (patch) | |
tree | 9fec84d4564530bc97b42d56e01a64abb96adac3 /crypto/asn1/a_digest.c | |
parent | cd4f7cddc7994d23d48b86cf638541c6e2310c2d (diff) |
Audit libcrypto for unchecked return values: fix all cases enountered
Diffstat (limited to 'crypto/asn1/a_digest.c')
-rw-r--r-- | crypto/asn1/a_digest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/asn1/a_digest.c b/crypto/asn1/a_digest.c index d00d9e22b1..cbdeea6ac0 100644 --- a/crypto/asn1/a_digest.c +++ b/crypto/asn1/a_digest.c @@ -87,7 +87,8 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, p=str; i2d(data,&p); - EVP_Digest(str, i, md, len, type, NULL); + if (!EVP_Digest(str, i, md, len, type, NULL)) + return 0; OPENSSL_free(str); return(1); } @@ -104,7 +105,8 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, i=ASN1_item_i2d(asn,&str, it); if (!str) return(0); - EVP_Digest(str, i, md, len, type, NULL); + if (!EVP_Digest(str, i, md, len, type, NULL)) + return 0; OPENSSL_free(str); return(1); } |