Changeset 178099 in webkit
- Timestamp:
- Jan 7, 2015 9:18:20 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r178097 r178099 1 2015-01-07 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 The ASCII decoding for non ASCII character is incorrect if this character comes after going through the fast decoding code path and before the end of the text by less than a machine word size of characters. 4 https://bugs.webkit.org/show_bug.cgi?id=140173. 5 6 Reviewed by Darin Adler. 7 8 * fast/encoding/char-after-fast-path-ascii-decoding-expected.txt: Added. 9 * fast/encoding/char-after-fast-path-ascii-decoding.html: Added. 10 Ensures when an non ASCII character comes after a machine word, whose bytes are all 11 ASCII characters, is decoded correctly. 12 1 13 2015-01-07 Shivakumar JM <shiva.jm@samsung.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r178097 r178099 1 2015-01-07 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 The ASCII decoding for non ASCII character is incorrect if this character comes after going through the fast decoding code path and before the end of the text by less than a machine word size of characters. 4 https://bugs.webkit.org/show_bug.cgi?id=140173. 5 6 Reviewed by Darin Adler. 7 8 Tests: fast/encoding/char-after-fast-path-ascii-decoding.html. 9 10 * platform/text/TextCodecLatin1.cpp: 11 (WebCore::TextCodecLatin1::decode): 12 This function has a bug when it goes through the fast decoding code path. After copying 13 one or more all ASCII MachineWords from source to the destination, the following byte 14 is copied as is from the source to the destination even if it is non ASCII byte. This 15 causes the decoded bytes to be incorrect. The fix is to ensure that the current byte 16 is still ASCII after exiting the fast decoding code path. 17 1 18 2015-01-07 Shivakumar JM <shiva.jm@samsung.com> 2 19 -
trunk/Source/WebCore/platform/text/TextCodecLatin1.cpp
r177280 r178099 147 147 if (source == end) 148 148 break; 149 150 // *source may not be ASCII anymore if source moves inside the loop of the fast code path 151 if (!isASCII(*source)) 152 goto useLookupTable; 149 153 } 150 154 *destination = *source; … … 198 202 if (source == end) 199 203 break; 204 205 // *source may not be ASCII anymore if source moves inside the loop of the fast code path 206 if (!isASCII(*source)) 207 goto useLookupTable16; 200 208 } 201 209 *destination16 = *source;
Note: See TracChangeset
for help on using the changeset viewer.