Suppress unsafe_libc_call (Debug only) in CFXJSE_Context. printf() is on the list (when called with string arguments), and this was previously hidden by NDEBUG in the release builds. Change-Id: I4d0ee94fc3cfc2f681e746c2451a82df46ff92c7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/128430 Reviewed-by: Thomas Sepez <tsepez@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cfxjse_context.cpp b/fxjs/xfa/cfxjse_context.cpp index 547b672..a4dd040 100644 --- a/fxjs/xfa/cfxjse_context.cpp +++ b/fxjs/xfa/cfxjse_context.cpp
@@ -10,6 +10,7 @@ #include "core/fxcrt/check.h" #include "core/fxcrt/check_op.h" +#include "core/fxcrt/compiler_specific.h" #include "core/fxcrt/ptr_util.h" #include "fxjs/cfxjs_engine.h" #include "fxjs/fxv8.h" @@ -283,7 +284,7 @@ #ifndef NDEBUG v8::String::Utf8Value error(GetIsolate(), trycatch.Exception()); - fprintf(stderr, "JS Error: %s\n", *error); + UNSAFE_TODO(fprintf(stderr, "JS Error: %s\n", *error)); v8::Local<v8::Message> message = trycatch.Message(); if (!message.IsEmpty()) { @@ -291,7 +292,7 @@ int linenum = message->GetLineNumber(context).FromJust(); v8::String::Utf8Value sourceline( GetIsolate(), message->GetSourceLine(context).ToLocalChecked()); - fprintf(stderr, "Line %d: %s\n", linenum, *sourceline); + UNSAFE_TODO(fprintf(stderr, "Line %d: %s\n", linenum, *sourceline)); } #endif // NDEBUG