diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-22 01:19:48 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-22 01:19:48 +0000 |
commit | 72d64e3e705eb129a85fabd4890f7257a70e63d2 (patch) | |
tree | c7e5d2f2053d9b6664879b580d3609b6ef362b9e | |
parent | 1609a763e3fd653bc7b97926dd30a60b0bc6a94b (diff) | |
download | nss-hg-72d64e3e705eb129a85fabd4890f7257a70e63d2.tar.gz |
Patch contributed by timeless@bemail.org
[Bug 334436] nsslowcert_UpdateSubjectEmailAddr doesn't consistently use emailAddrs as a guard of nemailAddrs guarding emailAddrs[0]. r=nelson
-rw-r--r-- | security/nss/lib/softoken/pcertdb.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/security/nss/lib/softoken/pcertdb.c b/security/nss/lib/softoken/pcertdb.c index 030cbc3d0..828ee2e3c 100644 --- a/security/nss/lib/softoken/pcertdb.c +++ b/security/nss/lib/softoken/pcertdb.c @@ -2721,11 +2721,9 @@ nsslowcert_UpdateSubjectEmailAddr(NSSLOWCERTCertDBHandle *dbhandle, goto loser; } - if ( entry->emailAddrs ) { - for (i=0; i < (int)(entry->nemailAddrs); i++) { - if (PORT_Strcmp(entry->emailAddrs[i],emailAddr) == 0) { - index = i; - } + for (i=0; i < (int)(entry->nemailAddrs); i++) { + if (PORT_Strcmp(entry->emailAddrs[i],emailAddr) == 0) { + index = i; } } @@ -2767,7 +2765,7 @@ nsslowcert_UpdateSubjectEmailAddr(NSSLOWCERTCertDBHandle *dbhandle, /* write the new one */ rv = WriteDBSubjectEntry(dbhandle, entry); if ( rv != SECSuccess ) { - goto loser; + goto loser; } DestroyDBEntry((certDBEntry *)entry); |