Closed Bug 211267 Opened 22 years ago Closed 22 years ago

nsSocketTransportService::Run doesn't check the return value of PL_DHashTableInit

Categories

(Core :: Networking, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.6alpha

People

(Reporter: timeless, Assigned: darin.moz)

References

()

Details

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: 558 gSocketThread = PR_GetCurrentThread(); 559 560 // 561 // Initialize hostname database 562 // 563 PL_DHashTableInit(&mHostDB, &ops, nsnull, sizeof(nsHostEntry), 0);
Target Milestone: --- → mozilla1.5alpha
Attached patch patch. Splinter Review
Comment on attachment 126857 [details] [diff] [review] patch. you don't really need to clear ops because only Run uses the hashtable and it cleans it up.
Attachment #126857 - Flags: superreview?(darin)
Attachment #126857 - Flags: review+
thanks for the patch suresh... i've actually already incorporated (roughly) this into some changes i am making to that function right now for another bug (bug 205726).
Depends on: 205726
Attachment #126857 - Flags: superreview?(darin)
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Target Milestone: mozilla1.5beta → mozilla1.6alpha
this is fixed now that the patch for bug 205726 has landed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: