Skip to content

Commit 2364429

Browse files
author
mcgreer%netscape.com
committed
another instance of potentially null signerInfos being referenced
1 parent 8eb7c48 commit 2364429

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

security/nss/lib/smime/cmssigdata.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/*
3535
* CMS signedData methods.
3636
*
37-
* $Id: cmssigdata.c,v 1.4 2000/09/13 18:13:17 mcgreer%netscape.com Exp $
37+
* $Id: cmssigdata.c,v 1.5 2000/09/13 22:44:28 mcgreer%netscape.com Exp $
3838
*/
3939

4040
#include "cmslocal.h"
@@ -404,8 +404,10 @@ NSS_CMSSignedData_Decode_AfterEnd(NSSCMSSignedData *sigd)
404404
signerinfos = sigd->signerInfos;
405405

406406
/* set cmsg for all the signerinfos */
407-
for (i = 0; signerinfos[i] != NULL; i++)
408-
signerinfos[i]->cmsg = sigd->cmsg;
407+
if (signerinfos) {
408+
for (i = 0; signerinfos[i] != NULL; i++)
409+
signerinfos[i]->cmsg = sigd->cmsg;
410+
}
409411

410412
return SECSuccess;
411413
}

0 commit comments

Comments
 (0)