From c0352f4584bf738b0073114d25e81e57b490d655 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 7 Aug 2018 17:02:12 +0000 Subject: Speculative fix for null deref above ThrowNoDefaultPropertyException Avoid possibility of an unterminated string or nullptr by avoiding stringviews, since the non-view classes copy and always provide a suitable result. Always use %ls and widestrings in wprintf() variants, since that combination is consistent across our platforms (%s, %S, etc. have idiosyncracies). Bug: 870952 Change-Id: Ief62a42c3486e8298f9583b56e9333db1a74972a Reviewed-on: https://pdfium-review.googlesource.com/39551 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fxjs/xfa/cjx_object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fxjs/xfa') diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 6984c3a998..23e754d4b7 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -193,7 +193,7 @@ void CJX_Object::ThrowIndexOutOfBoundsException() const { void CJX_Object::ThrowParamCountMismatchException( const WideString& method) const { - ThrowException(L"Incorrect number of parameters calling method '%.16s'.", + ThrowException(L"Incorrect number of parameters calling method '%ls'.", method.c_str()); } -- cgit v1.2.3