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

Unified Diff: core/include/fxcrt/fx_string.h

Issue 383563002: Fix an out-of-boundary issue for wide string (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add WStringLength function Created 6 years, 5 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 | « no previous file | core/src/fxcrt/fx_basic_util.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_string.h
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index fe56e1867ecaf73110c162ca4810a129b74d4bb6..26b04b70fad6f12c70e7ccf4dd7b9601d8c4872a 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
{
« no previous file with comments | « no previous file | core/src/fxcrt/fx_basic_util.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698