Closed Bug 353285 Opened 14 years ago Closed 14 years ago

nsresult rv used unitialized in nsXMLHttpRequest::Open

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: sciguyryan)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, klocwork)

Attachments

(1 file, 1 obsolete file)

Keywords: coverity
Attached patch Patch (obsolete) — Splinter Review
First try at a simple patch, early breakout if !cc, rv initialized as NS_OK.
Attachment #239318 - Flags: superreview?(bzbarsky)
Attachment #239318 - Flags: review?(bzbarsky)
Comment on attachment 239318 [details] [diff] [review]
Patch

>Index: nsXMLHttpRequest.cpp
>+  if (!cc) {
>+    return NS_ERROR_FAILURE;
>+  }

No, this is wrong.  That will make it completely impossible to do XMLHttpRequest from C++, which is highly undesirable.
Attachment #239318 - Flags: superreview?(bzbarsky)
Attachment #239318 - Flags: superreview-
Attachment #239318 - Flags: review?(bzbarsky)
Attachment #239318 - Flags: review-
Attached patch Patch 2Splinter Review
Second try.
Assignee: xml → sciguyryan+bugzilla
Attachment #239318 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #239362 - Flags: review?(bzbarsky)
Attachment #239362 - Flags: superreview+
Attachment #239362 - Flags: review?(bzbarsky)
Attachment #239362 - Flags: review+
Checked in.  Thanks for the patch!
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.