From e3fb994063468440dcdf47c04d0a7ed1d6da4003 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Wed, 19 Jan 2022 10:03:35 +0800 Subject: [PATCH] Bug 1735028 - check for missing signedData field r=keeler --- security/nss/lib/pkcs7/certread.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/security/nss/lib/pkcs7/certread.c b/security/nss/lib/pkcs7/certread.c index 3091f9947e..15094f2d78 100644 --- a/security/nss/lib/pkcs7/certread.c +++ b/security/nss/lib/pkcs7/certread.c @@ -139,6 +139,11 @@ SEC_ReadPKCS7Certs(SECItem *pkcs7Item, CERTImportCertificateFunc f, void *arg) goto done; } + if (contentInfo.content.signedData == NULL) { + PORT_SetError(SEC_ERROR_BAD_DER); + goto done; + } + rv = SECSuccess; certs = contentInfo.content.signedData->certificates;