Closed Bug 1403232 Opened 7 years ago Closed 7 years ago

vtt.jsm is buggy is the buffer to parse is uncompleted

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file)

in vtt.jsm there is this pattern:

while (self.buffer) {
  ...
  // If there is no cue identifier, keep the line and reuse this line
  // in next iteration.
  if (!parseCueIdentifier(line)) {
    continue;
  }

but if the line was the end of the buffer, self.buffer will be empty and the loop will not continue as the comment says.
Attached patch vtt.patchSplinter Review
Attachment #8912295 - Flags: review?(bechen)
Comment on attachment 8912295 [details] [diff] [review]
vtt.patch

Review of attachment 8912295 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the finding.
Please remember to run the web-platform-tests and mochitest-dom-media on try.
Attachment #8912295 - Flags: review?(bechen) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4eb4cec5bc8a
Fixing the WebVTT parser when the buffer uncompleted, r=bechen
https://hg.mozilla.org/mozilla-central/rev/4eb4cec5bc8a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: