Closed
Bug 211290
Opened 21 years ago
Closed 21 years ago
PRBool nsTemplateMatchRefSet::Add doesn't check the return value of PL_DHashTableInit
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
()
Details
Attachments
(1 file)
988 bytes,
patch
|
dbaron
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
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:
215 // Clobber the union; we'll treat it as a hashtable now.
216 PL_DHashTableInit(&mStorageElements.mTable, &gOps, nsnull, sizeof
(Entry), PL_DHASH_MIN_SIZE);
217
218 // Now that we've table-ized this thing, mCount better be a
219 // big freaking number, since it's sharing space with a
220 // pointer to the PLDHashTable's ops.
221 NS_ASSERTION(mStorageElements.mInlineMatches.mCount >
kMaxInlineMatches,
222 "wow, I thought it'd be bigger than _that_");
Attachment #128533 -
Flags: superreview?(bzbarsky)
Attachment #128533 -
Flags: review?(dbaron)
Updated•21 years ago
|
Attachment #128533 -
Flags: superreview?(bzbarsky) → superreview+
Attachment #128533 -
Flags: review?(dbaron) → review+
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•