Closed
Bug 211283
Opened 21 years ago
Closed 10 years ago
RuleHash::RuleHash doesn't check the return value of PL_DHashTableInit
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
DUPLICATE
of bug 962608
People
(Reporter: timeless, Unassigned)
References
()
Details
This is a code inspection bug.
QA:
To verify that this bug is fixed, make sure that all callers in of
PL_DHashTableInit in the indicated class/file check and handle a failure return
result.
To verify that this bug is invalid, simply verify (e.g. with lxr) that
PL_DHashTableInit is no longer used by the indicated class/file.
PL_DHashTableInit returns a PRBool indicating whether it succeeded.
PL_DHashTableInit *can* fail. Code can not assume that table->ops or table-
>data will be null (in fact it probably will not be), although in all
likelyhood table->entryStore will be null it probably isn't safe to assume this.
Code at time of bug filing:
412 {
413 // Initialize our arena
414 PL_INIT_ARENA_POOL(&mArena, "RuleHashArena",
NS_RULEHASH_ARENA_BLOCK_SIZE);
415
416 PL_DHashTableInit(&mTagTable, &RuleHash_TagTable_Ops, nsnull,
417 sizeof(RuleHashTableEntry), 64);
418 PL_DHashTableInit(&mIdTable,
419 aQuirksMode ? &RuleHash_IdTable_CIOps
420 : &RuleHash_IdTable_CSOps,
421 nsnull, sizeof(RuleHashTableEntry), 16);
422 PL_DHashTableInit(&mClassTable,
423 aQuirksMode ? &RuleHash_ClassTable_CIOps
424 : &RuleHash_ClassTable_CSOps,
425 nsnull, sizeof(RuleHashTableEntry), 16);
426 PL_DHashTableInit(&mNameSpaceTable, &RuleHash_NameSpaceTable_Ops, nsnull,
427 sizeof(RuleHashTableEntry), 16);
428 }
Comment 1•21 years ago
|
||
.
Assignee: dom_bugs → dbaron
Component: DOM Style → Style System
OS: Windows 2000 → All
Hardware: PC → All
Assignee: dbaron → nobody
QA Contact: ian → style-system
Comment 2•10 years ago
|
||
This got fixed when init was made infallible.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•