Changeset 172036 in webkit
- Timestamp:
- Aug 5, 2014 11:14:31 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r172033 r172036 1 2014-08-05 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> 2 3 ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken 4 https://bugs.webkit.org/show_bug.cgi?id=134632 5 6 Added test demonstrates that at-rules containing 16-bit Unicode characters 7 can be handled properly. 8 9 Reviewed by Darin Adler. 10 11 * fast/css/atrule-with-escape-character-crash-expected.txt: Added. 12 * fast/css/atrule-with-escape-character-crash.html: Added. 13 1 14 2014-08-05 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r172035 r172036 1 2014-08-05 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> 2 3 ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken 4 https://bugs.webkit.org/show_bug.cgi?id=134632 5 6 At-rules must consist of at least two characters: the '@' symbol followed by 7 an identifier name. The failure of this condition makes the assertion fail. 8 9 The length of an at-rule is currently calculated by pointer arithmetic on 10 the 'result' pointer, which is expected to be set to the end of the at-rule 11 identifier by the WebCore::*CSSTokenizer::parseIdentifier method. 12 If the at-rule token is a sequence of 8-bit-only characters then 13 'result' will point correctly at the end of the identifier. However, if 14 the at-rule contains a 16-bit Unicode escape then 'result' will not be 15 updated correctly anymore, hence it cannot be used for length calculation. 16 The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case. 17 18 Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002 19 20 Reviewed by Darin Adler. 21 22 Test: fast/css/atrule-with-escape-character-crash.html 23 24 * css/CSSParser.cpp: 25 (WebCore::CSSParser::realLex): 26 1 27 2014-08-04 Andy Estes <aestes@apple.com> 2 28 -
trunk/Source/WebCore/css/CSSParser.cpp
r172033 r172036 10299 10299 parseIdentifierInternal(currentCharacter<CharacterType>(), result16, hasEscape); 10300 10300 10301 result += result16 - start16; 10301 10302 resultString.init(start16, result16 - start16); 10302 10303
Note: See TracChangeset
for help on using the changeset viewer.