diff options
author | Phillip Hellewell <sshock@gmail.com> | 2016-06-11 20:04:21 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-06-12 07:50:32 -0400 |
commit | 6b3602882e089aaca18828a72d9f4072e6a20252 (patch) | |
tree | 796dcdb0e721304502e3bd42f508700e3243f215 /crypto | |
parent | 6d6e8070c26a043461edffc05c753d6350b6f085 (diff) |
RT3053: Check for NULL before dereferencing
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cms/cms_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c index 53eade3141..f9c73d1cbf 100644 --- a/crypto/cms/cms_lib.c +++ b/crypto/cms/cms_lib.c @@ -345,6 +345,8 @@ static STACK_OF(CMS_CertificateChoices) return &cms->d.signedData->certificates; case NID_pkcs7_enveloped: + if (cms->d.envelopedData->originatorInfo == NULL) + return NULL; return &cms->d.envelopedData->originatorInfo->certificates; default: @@ -420,6 +422,8 @@ static STACK_OF(CMS_RevocationInfoChoice) return &cms->d.signedData->crls; case NID_pkcs7_enveloped: + if (cms->d.envelopedData->originatorInfo == NULL) + return NULL; return &cms->d.envelopedData->originatorInfo->crls; default: |