diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-22 01:26:00 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-22 01:26:00 +0000 |
commit | eec7c564e26dc792a588541d047565c313da9fdd (patch) | |
tree | 6224b9d8e9bc0067586c04b2861952075d458e9d | |
parent | 72d64e3e705eb129a85fabd4890f7257a70e63d2 (diff) | |
download | nss-hg-eec7c564e26dc792a588541d047565c313da9fdd.tar.gz |
Patch contributed by timeless@bemail.org
[Bug 334449] oom Crash in crmf_template_copy_secalg. r=nelson
-rw-r--r-- | security/nss/lib/crmf/crmfreq.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/security/nss/lib/crmf/crmfreq.c b/security/nss/lib/crmf/crmfreq.c index 0937c50a8..73a0548b9 100644 --- a/security/nss/lib/crmf/crmfreq.c +++ b/security/nss/lib/crmf/crmfreq.c @@ -193,9 +193,12 @@ crmf_template_copy_secalg (PRArenaPool *poolp, SECAlgorithmID **dest, void *mark = NULL; SECAlgorithmID *mySecAlg; - if (poolp != NULL) { - mark = PORT_ArenaMark(poolp); + if (!poolp) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; } + + mark = PORT_ArenaMark(poolp); *dest = mySecAlg = PORT_ArenaZNew(poolp, SECAlgorithmID); if (mySecAlg == NULL) { goto loser; |