mirror of
https://github.com/openssl/openssl.git
synced 2024-12-05 07:54:47 +08:00
Fix CID 1466709 : Negative value passed to a function that cant be negative in cms_sd.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12930)
This commit is contained in:
parent
ced5231b04
commit
81777339e9
@ -854,7 +854,7 @@ int CMS_SignerInfo_verify(CMS_SignerInfo *si)
|
|||||||
|
|
||||||
alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf,
|
alen = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &abuf,
|
||||||
ASN1_ITEM_rptr(CMS_Attributes_Verify));
|
ASN1_ITEM_rptr(CMS_Attributes_Verify));
|
||||||
if (!abuf)
|
if (abuf == NULL || alen < 0)
|
||||||
goto err;
|
goto err;
|
||||||
r = EVP_DigestVerifyUpdate(mctx, abuf, alen);
|
r = EVP_DigestVerifyUpdate(mctx, abuf, alen);
|
||||||
OPENSSL_free(abuf);
|
OPENSSL_free(abuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user