Closed Bug 736903 Opened 12 years ago Closed 12 years ago

nsHttpChannel wraps the aOffset value it passes to its stream listener instead of clamping it

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: briansmith, Assigned: briansmith)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

See the documentation:

     * @param aOffset
     *        Number of bytes that were sent in previous onDataAvailable calls
     *        for this request. In other words, the sum of all previous count
     *        parameters.
     *        If that number is greater than or equal to 2^32, this parameter
     *        will be PR_UINT32_MAX (2^32 - 1).

The attached patch clamps the value in the same way that nsInputStreamPump::OnStateTransfer does.

Without this patch, MSVC complains about the implicit PRUint64 to PRUint32 conversion when mLogicalOffset is passed to OnDataAvailable.
Attachment #607035 - Flags: review?(cbiesinger)
Attachment #607035 - Flags: review?(cbiesinger) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d242e16d161c
Severity: normal → trivial
OS: Windows 7 → All
Hardware: x86_64 → All
Target Milestone: --- → mozilla14
http://hg.mozilla.org/mozilla-central/rev/d242e16d161c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: