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)

Other Branch
x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 962608

People

(Reporter: timeless, Unassigned)

References

()

Details

(Whiteboard: [kerh-cuz][has draft patch])

Attachments

(1 file)

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 }
Attached patch patchSplinter Review
Attachment #128532 - Flags: superreview?(bzbarsky)
Attachment #128532 - Flags: review?(kaie)
Attachment #128532 - Flags: superreview?(bzbarsky) → superreview+
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-
Timeless, could you update the patch?
Mass reassign ssaux bugs to nobody
Assignee: ssaux → nobody
Product: PSM → Core
Whiteboard: [kerh-cuz]
QA Contact: bmartin → ui
Severity: minor → normal
Whiteboard: [kerh-cuz] → [kerh-cuz][has draft patch]
Init is infallible now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: