Closed
Bug 1212223
Opened 9 years ago
Closed 9 years ago
nsMultiMixedConv might call |SendData| with incorrect buffer length
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: hchang, Assigned: hchang)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
When we hit [1] (the multipart content has preamble and the first token is probed), we only update the cursor to the first token without updating |bufLen|, which will be incorrectly used to compute the data length of |SendData| in [2] if the first chunk from network doesn't contain the entire subresource. (if the first chunk contains all of the first subresource it would be fine since the callback length is not derived from bufLen.)
[1] http://hg.mozilla.org/mozilla-central/file/727d765a5ed8/netwerk/streamconv/converters/nsMultiMixedConv.cpp#l666
[2] http://hg.mozilla.org/mozilla-central/file/727d765a5ed8/netwerk/streamconv/converters/nsMultiMixedConv.cpp#l825
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → hchang
Assignee | ||
Updated•9 years ago
|
Blocks: nsec-installing
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8670635 [details] [diff] [review]
Bug1212223.patch
Hi Valentin,
Could you please have a review of this patch? To prevent from any potential edge case, I add a couple of different chunks in the test case. Thanks!
Attachment #8670635 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment on attachment 8670635 [details] [diff] [review]
Bug1212223.patch
Review of attachment 8670635 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. Nice catch.
Attachment #8670635 -
Flags: review?(valentin.gosu) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8670635 -
Attachment is obsolete: true
Assignee | ||
Comment 6•9 years ago
|
||
Thank you Valentin :)
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•