From 9173fe7b9ccd5365c52c1a70b8643d9e13b2b942 Mon Sep 17 00:00:00 2001 From: Dennis Jackson Date: Fri, 20 May 2022 16:52:56 +0000 Subject: Bug 1767590 - Initialize pointers passed to NSS_CMSDigestContext_FinishMultiple r=nss-reviewers,jschanck As NSS_CMSDigestContext_FinishMultiple may leave its outparam unchanged when it returns SECSuccess, ensure that we set the value to NULL prior to invoking it. If this has happened because data was missing and hence the digest was never updated, the secasn1d parser will notice the missing child and raise a decodeError. Differential Revision: https://phabricator.services.mozilla.com/D145425 --- cmd/smimetools/cmsutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/smimetools/cmsutil.c b/cmd/smimetools/cmsutil.c index 9106d9955..4343695ed 100644 --- a/cmd/smimetools/cmsutil.c +++ b/cmd/smimetools/cmsutil.c @@ -219,7 +219,7 @@ decode(FILE *out, SECItem *input, const struct decodeOptionsStr *decodeOptions) switch (typetag) { case SEC_OID_PKCS7_SIGNED_DATA: { NSSCMSSignedData *sigd = NULL; - SECItem **digests; + SECItem **digests = NULL; int nsigners; int j; -- cgit v1.2.1