Closed Bug 1265076 Opened 8 years ago Closed 8 years ago

ArrayBufferInputStream violates readSegments contract

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file)

While working on bug 1244227 I ran into a curious situation where
the network throttling code would sometimes end up sending the wrong
data to the child process.

After much debugging I found out that there is a bug in ArrayBufferInputStream:

https://dxr.mozilla.org/mozilla-central/source/netwerk/base/ArrayBufferInputStream.cpp#114

This always passes 0 as the aToOffset parameter to the nsWriteSegmentFun.
However that is wrong if this goes through the loop more than once.
Whiteboard: [necko-active]
Comment on attachment 8741936 [details]
MozReview Request: Bug 1265076 - make ArrayBufferInputStream obey readSegments contract; r?mcmanus

https://reviewboard.mozilla.org/r/46853/#review44007
Attachment #8741936 - Flags: review?(mcmanus) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a2a9cec0506a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.