Skip to content
Permalink
Browse files
WebVTTParser's identifier buffering can ignore subsequent lines
https://bugs.webkit.org/show_bug.cgi?id=118483

Patch by Brendan Long <b.long@cablelabs.com> on 2013-07-24
Reviewed by Eric Carlson.

No new tests since this bug can't be reproduced in layout tests.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.

Canonical link: https://commits.webkit.org/136877@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
brendanlong authored and webkit-commit-queue committed Jul 24, 2013
1 parent 0b014fa commit 3056840949d55997d2e3946af3462d5263bf4a22
Showing 2 changed files with 14 additions and 2 deletions.
@@ -1,3 +1,15 @@
2013-07-24 Brendan Long <b.long@cablelabs.com>

WebVTTParser's identifier buffering can ignore subsequent lines
https://bugs.webkit.org/show_bug.cgi?id=118483

Reviewed by Eric Carlson.

No new tests since this bug can't be reproduced in layout tests.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.

2013-07-23 Andreas Kling <akling@apple.com>

REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
@@ -151,9 +151,9 @@ void WebVTTParser::parseBytes(const char* data, unsigned length)

switch (m_state) {
case Initial:
// Buffer up at least 9 bytes before proceeding with checking for the file identifier.
// Buffer up at least 9 bytes or a full line before proceeding with checking for the file identifier.
m_identifierData.append(data, length);
if (m_identifierData.size() < bomLength + fileIdentifierLength)
if (position == line.sizeInBytes() && m_identifierData.size() < bomLength + fileIdentifierLength)
return;

// 4-12 - Collect the first line and check for "WEBVTT".

0 comments on commit 3056840

Please sign in to comment.