RT3053: Check for NULL before dereferencing
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 6b3602882e
)
This commit is contained in:
parent
5bbdc26cad
commit
63b2499b67
1 changed files with 4 additions and 0 deletions
|
@ -413,6 +413,8 @@ static STACK_OF(CMS_CertificateChoices)
|
||||||
return &cms->d.signedData->certificates;
|
return &cms->d.signedData->certificates;
|
||||||
|
|
||||||
case NID_pkcs7_enveloped:
|
case NID_pkcs7_enveloped:
|
||||||
|
if (cms->d.envelopedData->originatorInfo == NULL)
|
||||||
|
return NULL;
|
||||||
return &cms->d.envelopedData->originatorInfo->certificates;
|
return &cms->d.envelopedData->originatorInfo->certificates;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -488,6 +490,8 @@ static STACK_OF(CMS_RevocationInfoChoice)
|
||||||
return &cms->d.signedData->crls;
|
return &cms->d.signedData->crls;
|
||||||
|
|
||||||
case NID_pkcs7_enveloped:
|
case NID_pkcs7_enveloped:
|
||||||
|
if (cms->d.envelopedData->originatorInfo == NULL)
|
||||||
|
return NULL;
|
||||||
return &cms->d.envelopedData->originatorInfo->crls;
|
return &cms->d.envelopedData->originatorInfo->crls;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue