diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-14 12:13:53 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-14 12:13:53 -0700 |
commit | 8daab317ff959905e926b861a7d2aa876fd10429 (patch) | |
tree | d42dbefe9bbdf4492c537253fbc23abf21585fb5 /core/include | |
parent | 456cde93a928629bbf2ac64bda13ef7923359823 (diff) | |
download | pdfium-8daab317ff959905e926b861a7d2aa876fd10429.tar.xz |
Fix an out-of-boundary issue for wide string
BUG=381521
R=palmer@chromium.org
Review URL: https://codereview.chromium.org/383563002
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/fxcrt/fx_string.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index fe56e1867e..26b04b70fa 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -634,9 +634,11 @@ public: static CFX_WideString FromLocal(const char* str, FX_STRSIZE len = -1); - static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len = -1); + static CFX_WideString FromUTF8(const char* str, FX_STRSIZE len); - static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len = -1); + static CFX_WideString FromUTF16LE(const unsigned short* str, FX_STRSIZE len); + + static FX_STRSIZE WStringLength(const unsigned short* str); operator FX_LPCWSTR() const { |