summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/jsapi/fxjs_v8.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-07-14 12:13:53 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-07-14 12:13:53 -0700
commit8daab317ff959905e926b861a7d2aa876fd10429 (patch)
treed42dbefe9bbdf4492c537253fbc23abf21585fb5 /fpdfsdk/src/jsapi/fxjs_v8.cpp
parent456cde93a928629bbf2ac64bda13ef7923359823 (diff)
downloadpdfium-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 'fpdfsdk/src/jsapi/fxjs_v8.cpp')
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index f2336ab2fc..5eb9873f5c 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -734,7 +734,7 @@ CFX_WideString JS_ToString(v8::Handle<v8::Value> pValue)
{
if(pValue.IsEmpty()) return L"";
v8::String::Utf8Value s(pValue->ToString());
- return CFX_WideString::FromUTF8(*s);
+ return CFX_WideString::FromUTF8(*s, s.length());
}
v8::Handle<v8::Array> JS_ToArray(v8::Handle<v8::Value> pValue)