Bug 857076: fix various build warnings in security/manager/ssl/src/, r=bsmith
authorNathan Froyd <froydnj@gmail.com>
Mon, 24 Jun 2013 00:57:51 -0700
changeset 20389 090180f1f63d97b113afddceb24345bdc37b9b12
parent 20388 8fdf801967270795ec211b28775c7ec1fa3bd310
child 20390 2ebfb2b8ab33df133d7818d151e38ee01336a6d8
push id1209
push usermbanner@mozilla.com
push dateTue, 02 Sep 2014 16:59:36 +0000
treeherdercomm-beta@842e0fd167ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmith
bugs857076
Bug 857076: fix various build warnings in security/manager/ssl/src/, r=bsmith
mailnews/mime/src/nsCMS.cpp
--- a/mailnews/mime/src/nsCMS.cpp
+++ b/mailnews/mime/src/nsCMS.cpp
@@ -254,16 +254,17 @@ nsresult nsCMSMessage::CommonVerifySigna
 
   // Import certs. Note that import failure is not a signature verification failure. //
   if (NSS_CMSSignedData_ImportCerts(sigd, CERT_GetDefaultCertDB(), certUsageEmailRecipient, true) != SECSuccess) {
     PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("nsCMSMessage::CommonVerifySignature - can not import certs\n"));
   }
 
   nsigners = NSS_CMSSignedData_SignerInfoCount(sigd);
   PR_ASSERT(nsigners > 0);
+  NS_ENSURE_TRUE(nsigners > 0, NS_ERROR_UNEXPECTED);
   si = NSS_CMSSignedData_GetSignerInfo(sigd, 0);
 
   // See bug 324474. We want to make sure the signing cert is 
   // still valid at the current time.
 
   certVerifier = GetDefaultCertVerifier();
   NS_ENSURE_TRUE(certVerifier, NS_ERROR_UNEXPECTED);