| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
|
| index c395283fc3a5d01619bf4bac87a14fc1391439d5..022d788c72d54d6efdc2d313d253741a2eb59b18 100644
|
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
|
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
|
| @@ -1,7 +1,7 @@
|
| // Copyright 2014 PDFium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
| -
|
| +
|
| // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
|
|
|
| #include "../../../include/fpdfapi/fpdf_parser.h"
|
| @@ -402,7 +402,7 @@ CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap
|
| CFX_WideString result;
|
| if (src_len >= 2 && ((src_data[0] == 0xfe && src_data[1] == 0xff) || (src_data[0] == 0xff && src_data[1] == 0xfe))) {
|
| FX_BOOL bBE = src_data[0] == 0xfe;
|
| - int max_chars = (src_len - 2) / 2;
|
| + FX_DWORD max_chars = (src_len - 2) / 2;
|
| if (!max_chars) {
|
| return result;
|
| }
|
| @@ -412,7 +412,7 @@ CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap
|
| FX_LPWSTR dest_buf = result.GetBuffer(max_chars);
|
| FX_LPCBYTE uni_str = src_data + 2;
|
| int dest_pos = 0;
|
| - for (int i = 0; i < max_chars * 2; i += 2) {
|
| + for (FX_DWORD i = 0; i < max_chars * 2; i += 2) {
|
| FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) : (uni_str[i + 1] << 8 | uni_str[i]);
|
| if (unicode == 0x1b) {
|
| i += 2;
|
|
|