diff options
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_digest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_digest.c b/crypto/asn1/a_digest.c index 3e7b418a19..9211d7a968 100644 --- a/crypto/asn1/a_digest.c +++ b/crypto/asn1/a_digest.c @@ -63,7 +63,7 @@ int asn1_item_digest_with_libctx(const ASN1_ITEM *it, const EVP_MD *md, EVP_MD *fetched_md = (EVP_MD *)md; i = ASN1_item_i2d(asn, &str, it); - if (str == NULL) + if (i < 0 || str == NULL) return 0; if (EVP_MD_provider(md) == NULL) { |