Bug 399706, glibc detected: free(): invalid pointer attempting to select cert Regression fix for crash introduced by recent landing for bug 392790. Using minimal fix for M9 endgame. r=kengert, r=Kaspar Brand, a=beltzner
authorkaie@kuix.de
Wed, 24 Oct 2007 15:30:34 -0700
changeset 7150 5aa2631f68a8c490c6474ce5adfde5e9493b9d78
parent 7149 71b592e88f271c9285a94053610b04b8fd611711
child 7151 c3b2791193f78a7c1b822a31c720a0064c42ca1f
push idunknown
push userunknown
push dateunknown
reviewerskengert, Kaspar, beltzner
bugs399706, 392790
milestone1.9a9pre
Bug 399706, glibc detected: free(): invalid pointer attempting to select cert Regression fix for crash introduced by recent landing for bug 392790. Using minimal fix for M9 endgame. r=kengert, r=Kaspar Brand, a=beltzner
security/manager/ssl/src/nsNSSCertificate.cpp
--- a/security/manager/ssl/src/nsNSSCertificate.cpp
+++ b/security/manager/ssl/src/nsNSSCertificate.cpp
@@ -439,18 +439,19 @@ nsNSSCertificate::FormatUIStrings(const 
         details.Append(info);
         details.AppendLiteral(": ");
       }
       details.Append(temp1);
       details.Append(PRUnichar('\n'));
     }
 
     PRUint32 num;
-    PRUnichar **emailAddr = NULL;
-    if (NS_SUCCEEDED(GetEmailAddresses(&num, &emailAddr)) && num > 0) {
+    PRUnichar **emailArray = NULL;
+    if (NS_SUCCEEDED(GetEmailAddresses(&num, &emailArray)) && num > 0) {
+      PRUnichar **emailAddr = emailArray;
       details.AppendLiteral("  ");
       if (NS_SUCCEEDED(nssComponent->GetPIPNSSBundleString("CertInfoEmail", info))) {
         details.Append(info);
         details.AppendLiteral(": ");
       }
       details.Append(*emailAddr);
 
       /*
@@ -473,18 +474,18 @@ nsNSSCertificate::FormatUIStrings(const 
         *emailAddr = nsnull;
         emailAddr++;
         num--;
       }
 
       details.Append(PRUnichar('\n'));
       nsMemory::Free(firstEmail);
     }
-    nsMemory::Free(emailAddr);
-    emailAddr = nsnull;
+    nsMemory::Free(emailArray);
+    emailArray = nsnull;
 
     if (NS_SUCCEEDED(nssComponent->GetPIPNSSBundleString("CertInfoIssuedBy", info))) {
       details.Append(info);
       details.Append(PRUnichar(' '));
 
       if (NS_SUCCEEDED(x509Proxy->GetIssuerName(temp1)) && !temp1.IsEmpty()) {
         details.Append(temp1);
       }