зеркало из https://github.com/mozilla/gecko-dev.git
[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
This commit is contained in:
Родитель
a4ac6b44ff
Коммит
e05b17bc20
|
@ -35,7 +35,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.86 $ $Date: 2005/03/04 04:32:04 $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.87 $ $Date: 2006/05/18 21:00:58 $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
/*
|
||||
|
@ -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]);
|
||||
|
|
Загрузка…
Ссылка в новой задаче