projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d6e807
)
RT3053: Check for NULL before dereferencing
author
Phillip Hellewell
<sshock@gmail.com>
Sun, 12 Jun 2016 00:04:21 +0000
(20:04 -0400)
committer
Rich Salz
<rsalz@openssl.org>
Sun, 12 Jun 2016 11:50:32 +0000
(07:50 -0400)
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/cms/cms_lib.c
patch
|
blob
|
history
diff --git
a/crypto/cms/cms_lib.c
b/crypto/cms/cms_lib.c
index 53eade31417ba7c1879a3ea979ee32baa9ba4387..f9c73d1cbf4e88748175958803e0e99aaf4756fa 100644
(file)
--- 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: