Fix coverity CID - Negative return passed to a function param using size_t in asn1_item_digest_with_libctx()
@@ -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) {
