diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-05-18 21:00:58 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-05-18 21:00:58 +0000 |
commit | 2ae321ef1551d47ba938297bf750dc77857c82e9 (patch) | |
tree | d9b03303d19965524ab14dc27566e63de9627a6d /security/nss | |
parent | fde43f4bbd4ef628f31d58f5ccc17c4d775d4dbc (diff) | |
download | nss-hg-2ae321ef1551d47ba938297bf750dc77857c82e9.tar.gz |
[Bug 337008] OOM crash [@ nssList_Add - STAN_InitTokenForSlotInfo - STAN_LoadDefaultNSS3TrustDomain][@ nssList_Clone - nssList_CreateIterator - STAN_LoadDefaultNSS3TrustDomain] Dereferencing possibly NULL "(td)->tokenList". r=nelson, sr=wtc
Diffstat (limited to 'security/nss')
-rw-r--r-- | security/nss/lib/pki/pki3hack.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/nss/lib/pki/pki3hack.c b/security/nss/lib/pki/pki3hack.c index bbbeb5d4b..c274d2e75 100644 --- a/security/nss/lib/pki/pki3hack.c +++ b/security/nss/lib/pki/pki3hack.c @@ -149,6 +149,12 @@ STAN_LoadDefaultNSS3TrustDomain ( SECMOD_GetReadLock(moduleLock); NSSRWLock_LockWrite(td->tokensLock); td->tokenList = nssList_Create(td->arena, PR_TRUE); + if (!td->tokenList) { + NSSRWLock_UnlockWrite(td->tokensLock); + SECMOD_ReleaseReadLock(moduleLock); + NSSTrustDomain_Destroy(td); + return PR_FAILURE; + } for (mlp = SECMOD_GetDefaultModuleList(); mlp != NULL; mlp=mlp->next) { for (i=0; i < mlp->module->slotCount; i++) { STAN_InitTokenForSlotInfo(td, mlp->module->slots[i]); |