summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexei.volkov.bugs%sun.com <devnull@localhost>2006-05-15 21:05:20 +0000
committeralexei.volkov.bugs%sun.com <devnull@localhost>2006-05-15 21:05:20 +0000
commit306519404e480707d29915c59f338ac424fb76a4 (patch)
treed83020f4b6d1ccdfa31960c19925c686e61c1f78
parentd9a279205c3406e7a92313956488f9d6a35e7078 (diff)
downloadnss-hg-306519404e480707d29915c59f338ac424fb76a4.tar.gz
[Bug 336482] crash or hopefully deadcode [@ crmf_copy_poposigningkey]
because Pointer "destPopoSignKey" dereferenced before NULL check. r=nelson
-rw-r--r--security/nss/lib/crmf/servget.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/security/nss/lib/crmf/servget.c b/security/nss/lib/crmf/servget.c
index 45b056fa4..85be9e556 100644
--- a/security/nss/lib/crmf/servget.c
+++ b/security/nss/lib/crmf/servget.c
@@ -409,7 +409,7 @@ crmf_copy_poposigningkey(PRArenaPool *poolp,
}
return SECSuccess;
loser:
- if (destPopoSignKey && poolp == NULL) {
+ if (poolp == NULL) {
CRMF_DestroyPOPOSigningKey(destPopoSignKey);
}
return SECFailure;
@@ -440,13 +440,10 @@ crmf_copy_popoprivkey(PRArenaPool *poolp,
rv = SECFailure;
}
- if (rv != SECSuccess) {
- if (destPrivKey && poolp == NULL) {
- CRMF_DestroyPOPOPrivKey(destPrivKey);
- }
- return SECFailure;
+ if (rv != SECSuccess && poolp == NULL) {
+ CRMF_DestroyPOPOPrivKey(destPrivKey);
}
- return SECSuccess;
+ return rv;
}
static CRMFProofOfPossession*