Closed
Bug 211267
Opened 21 years ago
Closed 21 years ago
nsSocketTransportService::Run doesn't check the return value of PL_DHashTableInit
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.6alpha
People
(Reporter: timeless, Assigned: darin.moz)
References
()
Details
Attachments
(1 file)
776 bytes,
patch
|
timeless
:
review+
|
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:
558 gSocketThread = PR_GetCurrentThread();
559
560 //
561 // Initialize hostname database
562 //
563 PL_DHashTableInit(&mHostDB, &ops, nsnull, sizeof(nsHostEntry), 0);
Assignee | ||
Updated•21 years ago
|
Target Milestone: --- → mozilla1.5alpha
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+
Assignee | ||
Comment 3•21 years ago
|
||
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
Assignee | ||
Updated•21 years ago
|
Attachment #126857 -
Flags: superreview?(darin)
Assignee | ||
Updated•21 years ago
|
Target Milestone: mozilla1.5alpha → mozilla1.5beta
Assignee | ||
Updated•21 years ago
|
Target Milestone: mozilla1.5beta → mozilla1.6alpha
Assignee | ||
Comment 4•21 years ago
|
||
this is fixed now that the patch for bug 205726 has landed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•