Closed Bug 1350239 Opened 7 years ago Closed 7 years ago

SlicedInputStream has a buggy ::Seek implementation

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file, 1 obsolete file)

Seek() doesn't consider if the reading already started or not. Plus the current position is recalculated on top of the starting point.
Attached patch sliced_bug.patch (obsolete) — Splinter Review
Assignee: nobody → amarchesini
Attachment #8850869 - Flags: review?(bugs)
Comment on attachment 8850869 [details] [diff] [review]
sliced_bug.patch

This code could in general use CheckedInt. Not about this bug, but worth to file another bug.


Do we need this in Aurora.

How did you find this issue? Can we get a test for this?
Attachment #8850869 - Flags: review?(bugs) → review+
> How did you find this issue? Can we get a test for this?

PBlob refactoring. I'll extend the gtests before landing the patch.
Attached patch sliced_bug.patchSplinter Review
Also END is buggy if the length is > then the real size of the inputStream +tests
Attachment #8850869 - Attachment is obsolete: true
Attachment #8850910 - Flags: review?(bugs)
Comment on attachment 8850910 [details] [diff] [review]
sliced_bug.patch

Still asking, do we need all this for Aurora too? I assume so.

Weird indentation inside 'case NS_SEEK_END:'
Attachment #8850910 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a506737fb2a0
SlicedInputStream::Seek must set correct position in the source stream, r=smaug
https://hg.mozilla.org/mozilla-central/rev/a506737fb2a0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: