commit | 75c65210c59de575f5a536f53bab9018b6edbed9 | [log] [tgz] |
---|---|---|
author | Ryan Harrison <rharrison@chromium.org> | Wed Aug 16 13:52:15 2017 -0400 |
committer | Chromium commit bot <commit-bot@chromium.org> | Wed Aug 16 18:48:31 2017 +0000 |
tree | 6072ac564723d2dbda968775c5230fcd95831a58 | |
parent | cd04b727f0b182f4ca39bb5b9198ba2f6389e05d [diff] |
Add in missting string length check BUG=chromium:754984 Change-Id: I106d460c80804797cee537d1990f901b5bf5a519 Reviewed-on: https://pdfium-review.googlesource.com/11171 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index 2996316..0981541 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -1762,7 +1762,7 @@ } CFX_WideString str = params[0].ToCFXWideString(pRuntime); - if (str[0] == L'.' || str[0] == L',') + if (str.GetLength() > 0 && (str[0] == L'.' || str[0] == L',')) str = L"0" + str; CFX_WideString sPart;