From d3a3cc24a034654b0825e4822446ddfc6a22c045 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 16 May 2017 10:48:51 -0700 Subject: 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 Reviewed-by: dsinclair --- xfa/fxfa/fm2js/xfa_lexer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'xfa/fxfa/fm2js/xfa_lexer.cpp') diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp index bdffa7e998..be3bb290b9 100644 --- a/xfa/fxfa/fm2js/xfa_lexer.cpp +++ b/xfa/fxfa/fm2js/xfa_lexer.cpp @@ -493,6 +493,7 @@ void CXFA_FMLexer::Error(const wchar_t* msg, ...) { va_start(ap, msg); m_pErrorInfo->message.FormatV(msg, ap); va_end(ap); + ASSERT(!m_pErrorInfo->message.IsEmpty()); } bool CXFA_FMLexer::HasError() const { -- cgit v1.2.3