summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_error.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-16 10:48:51 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-16 18:28:31 +0000
commitd3a3cc24a034654b0825e4822446ddfc6a22c045 (patch)
tree49041ae111c6d611664d6b22946a9e34129d0c83 /xfa/fxfa/fm2js/xfa_error.cpp
parent9774984f96946eb96eed29abfcbe824cb5858bbb (diff)
downloadpdfium-d3a3cc24a034654b0825e4822446ddfc6a22c045.tar.xz
Handle when XFA parser error handlers cannot format error messages.
Limit the length of error messages to avoid string formatting failure. Simplify some CXFA_FMParse error handling code too. BUG=chromium:708428 Change-Id: I2f5fdb61349a90b3ba681dcc04a26ce0d7f2bdda Reviewed-on: https://pdfium-review.googlesource.com/5331 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_error.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_error.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/xfa_error.cpp b/xfa/fxfa/fm2js/xfa_error.cpp
index ea0511a89a..5a76d614d1 100644
--- a/xfa/fxfa/fm2js/xfa_error.cpp
+++ b/xfa/fxfa/fm2js/xfa_error.cpp
@@ -9,10 +9,10 @@
const wchar_t kFMErrUnsupportedChar[] = L"unsupported char '%c'";
const wchar_t kFMErrBadSuffixNumber[] = L"bad suffix on number";
const wchar_t kFMErrExpectedIdentifier[] =
- L"expected identifier instead of '%s'";
-const wchar_t kFMErrExpectedToken[] = L"expected '%s' instead of '%s'";
-const wchar_t kFMErrExpectedEndIf[] = L"expected 'endif' instead of '%s'";
-const wchar_t kFMErrUnexpectedExpression[] = L"unexpected expression '%s'";
+ L"expected identifier instead of '%.16s'";
+const wchar_t kFMErrExpectedToken[] = L"expected '%.16s' instead of '%.16s'";
+const wchar_t kFMErrExpectedEndIf[] = L"expected 'endif' instead of '%.16s'";
+const wchar_t kFMErrUnexpectedExpression[] = L"unexpected expression '%.16s'";
const wchar_t kFMErrExpectedNonEmptyExpression[] =
L"expected non-empty expression";
const wchar_t kFMErrLongAssignmentChain[] =