Changeset 99039 in webkit
- Timestamp:
- Nov 1, 2011 10:48:12 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r99035 r99039 1 2011-11-01 Anna Cavender <annacc@chromium.org> 2 3 Small fixes for WebVTTParser. 4 https://bugs.webkit.org/show_bug.cgi?id=71334 5 6 Reviewed by Darin Adler. 7 8 No new tests. This is needed to enable other tests, coming soon. 9 10 * html/track/WebVTTParser.cpp: 11 (WebCore::hasLongWebVTTIdentifier): changed to return true when header is 12 exactly "WEBVTT" 13 (WebCore::WebVTTParser::collectTimingsAndSettings): fix typos, position should 14 only progress once when checking the character after a timestamp. 15 1 16 2011-11-01 Darin Adler <darin@apple.com> 2 17 -
trunk/Source/WebCore/html/track/WebVTTParser.cpp
r97883 r99039 65 65 66 66 // or the seventh character is neither a space nor a tab character, then abort. 67 if (line [fileIdentiferLength] != ' ' && line[fileIdentiferLength] != '\t')67 if (line.length() > fileIdentiferLength && line[fileIdentiferLength] != ' ' && line[fileIdentiferLength] != '\t') 68 68 return false; 69 69 … … 191 191 if (m_currentStartTime == malformedTime) 192 192 return BadCue; 193 if (line[position++] != ' ' && line[position++] != '\t') 193 if (position >= line.length()) 194 return BadCue; 195 char nextChar = line[position++]; 196 if (nextChar != ' ' && nextChar != '\t') 194 197 return BadCue; 195 198 skipWhiteSpace(line, &position); … … 199 202 return BadCue; 200 203 position += 3; 201 if (line[position++] != ' ' && line[position++] != '\t') 204 if (position >= line.length()) 205 return BadCue; 206 nextChar = line[position++]; 207 if (nextChar != ' ' && nextChar != '\t') 202 208 return BadCue; 203 209 skipWhiteSpace(line, &position);
Note: See TracChangeset
for help on using the changeset viewer.