summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2002-06-21 20:25:49 +0000
committerrelyea%netscape.com <devnull@localhost>2002-06-21 20:25:49 +0000
commit61a23b25cde9b88bd5821b1609650fb0cf1ad1af (patch)
tree3f67ed9fa8e715feee4f8528335fedec6dcab119
parent259345e38cf839972811e0e6049e034e73b279e9 (diff)
downloadnss-hg-61a23b25cde9b88bd5821b1609650fb0cf1ad1af.tar.gz
zero structure before we fill it in, not after
-rw-r--r--security/nss/lib/softoken/lowcert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/nss/lib/softoken/lowcert.c b/security/nss/lib/softoken/lowcert.c
index ae475f567..d11b3549d 100644
--- a/security/nss/lib/softoken/lowcert.c
+++ b/security/nss/lib/softoken/lowcert.c
@@ -538,10 +538,10 @@ nsslowcert_KeyFromDERCert(PRArenaPool *arena, SECItem *derCert, SECItem *key)
int rv;
NSSLOWCERTCertKey certkey;
+ PORT_Memset(&certkey, 0, sizeof(NSSLOWCERTCertKey));
rv = nsslowcert_GetCertFields(derCert->data, derCert->len,
&certkey.derIssuer, &certkey.serialNumber, NULL, NULL, NULL, NULL);
-
- PORT_Memset(&certkey, 0, sizeof(NSSLOWCERTCertKey));
+
if ( rv ) {
goto loser;