diff options
author | relyea%netscape.com <devnull@localhost> | 2002-06-21 20:25:49 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2002-06-21 20:25:49 +0000 |
commit | 61a23b25cde9b88bd5821b1609650fb0cf1ad1af (patch) | |
tree | 3f67ed9fa8e715feee4f8528335fedec6dcab119 | |
parent | 259345e38cf839972811e0e6049e034e73b279e9 (diff) | |
download | nss-hg-61a23b25cde9b88bd5821b1609650fb0cf1ad1af.tar.gz |
zero structure before we fill it in, not after
-rw-r--r-- | security/nss/lib/softoken/lowcert.c | 4 |
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; |