Closed
Bug 211292
Opened 21 years ago
Closed 10 years ago
nsNSSShutDownList::nsNSSShutDownList doesn't check the return value of PL_DHashTableInit
Categories
(Core Graveyard :: Security: UI, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 962608
People
(Reporter: timeless, Unassigned)
References
()
Details
(Whiteboard: [kerh-cuz][has draft patch])
Attachments
(1 file)
1.14 KB,
patch
|
KaiE
:
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:
90 mPK11LogoutCancelObjects.ops = nsnull;
91 mObjects.ops = nsnull;
92 PL_DHashTableInit(&mObjects, &gSetOps, nsnull,
93 sizeof(ObjectHashEntry), 16);
94 PL_DHashTableInit(&mPK11LogoutCancelObjects, &gSetOps, nsnull,
95 sizeof(ObjectHashEntry), 16);
96 }
97
98 nsNSSShutDownList::~nsNSSShutDownList()
99 {
100 if (mListLock) {
101 PR_DestroyLock(mListLock);
102 mListLock = nsnull;
103 }
104 if (mObjects.ops) {
105 PL_DHashTableFinish(&mObjects);
106 mObjects.ops = nsnull;
107 }
108 if (mPK11LogoutCancelObjects.ops) {
109 PL_DHashTableFinish(&mPK11LogoutCancelObjects);
110 mPK11LogoutCancelObjects.ops = nsnull;
111 }
Attachment #128532 -
Flags: superreview?(bzbarsky)
Attachment #128532 -
Flags: review?(kaie)
Updated•21 years ago
|
Attachment #128532 -
Flags: superreview?(bzbarsky) → superreview+
Comment 2•21 years ago
|
||
Comment on attachment 128532 [details] [diff] [review]
patch
Your change makes sense, but I suggest to be complete.
The change you made in one of the ::remember methods should probably be made in
both ::remember and in both ::forget functions.
Attachment #128532 -
Flags: review?(kaie) → review-
Comment 3•21 years ago
|
||
Timeless, could you update the patch?
Updated•19 years ago
|
Whiteboard: [kerh-cuz]
Updated•17 years ago
|
QA Contact: bmartin → ui
Updated•14 years ago
|
Severity: minor → normal
Whiteboard: [kerh-cuz] → [kerh-cuz][has draft patch]
Comment 5•10 years ago
|
||
Init is infallible now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•