summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornelsonb%netscape.com <devnull@localhost>2003-11-15 00:15:28 +0000
committernelsonb%netscape.com <devnull@localhost>2003-11-15 00:15:28 +0000
commita0c50a4c354a37b7f72de624fa983fa885a82815 (patch)
tree4bcd3fb27bc2d0e6d819bb2483dda46c01f65ec3
parent7bc73da2b2f7e8138f9b831fc7f65ffd7de5632a (diff)
downloadnss-hg-a0c50a4c354a37b7f72de624fa983fa885a82815.tar.gz
Detect empty emailAddr strings in CERTCertificate. Bugzilla bug 211540.
-rw-r--r--security/nss/lib/pk11wrap/pk11cert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c
index 275fa3ac5..d2b2cd578 100644
--- a/security/nss/lib/pk11wrap/pk11cert.c
+++ b/security/nss/lib/pk11wrap/pk11cert.c
@@ -1681,7 +1681,7 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert,
PK11_SETATTRS(attrs,CKA_NETSCAPE_TRUST, certUsage,
sizeof(SECCertUsage));
attrs++;
- if (cert->emailAddr) {
+ if (cert->emailAddr && cert->emailAddr[0]) {
PK11_SETATTRS(attrs,CKA_NETSCAPE_EMAIL, cert->emailAddr,
PORT_Strlen(cert->emailAddr);
attrs++;
@@ -1765,7 +1765,7 @@ done:
goto loser;
}
- if (PK11_IsInternal(slot) && cert->emailAddr) {
+ if (PK11_IsInternal(slot) && cert->emailAddr && cert->emailAddr[0]) {
emailAddr = cert->emailAddr;
}