Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: icu52/patches/csetdet.patch

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu52/patches/converters.patch ('k') | icu52/patches/data.build.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu52/patches/csetdet.patch
===================================================================
--- icu52/patches/csetdet.patch (revision 261498)
+++ icu52/patches/csetdet.patch (working copy)
@@ -1,35 +0,0 @@
-Index: source/i18n/csrucode.cpp
-===================================================================
---- source/i18n/csrucode.cpp (revision 214189)
-+++ source/i18n/csrucode.cpp (working copy)
-@@ -31,8 +31,9 @@
- int32_t CharsetRecog_UTF_16_BE::match(InputText* textIn)
- {
- const uint8_t *input = textIn->fRawInput;
-+ int32_t length = textIn->fRawLength;
-
-- if (input[0] == 0xFE && input[1] == 0xFF) {
-+ if (length >=2 && input[0] == 0xFE && input[1] == 0xFF) {
- return 100;
- }
-
-@@ -53,8 +54,9 @@
- int32_t CharsetRecog_UTF_16_LE::match(InputText* textIn)
- {
- const uint8_t *input = textIn->fRawInput;
-+ int32_t length = textIn->fRawLength;
-
-- if (input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
-+ if (length >= 4 && input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
- return 100;
- }
-
-@@ -76,7 +78,7 @@
- bool hasBOM = FALSE;
- int32_t confidence = 0;
-
-- if (getChar(input, 0) == 0x0000FEFFUL) {
-+ if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) {
- hasBOM = TRUE;
- }
-
« no previous file with comments | « icu52/patches/converters.patch ('k') | icu52/patches/data.build.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698