From 38ad68cdea4fe106293d55ae1b96bab2791f96c7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 24 Nov 2015 15:28:54 -0800 Subject: make master samples/ and public/ look more like XFA BUG= R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477603002 . --- public/fpdf_formfill.h | 1 + samples/pdfium_test.cc | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h index baab18ab92..5fc9cbb2e2 100644 --- a/public/fpdf_formfill.h +++ b/public/fpdf_formfill.h @@ -654,6 +654,7 @@ typedef struct _FPDF_FORMFILLINFO { int zoomMode, float* fPosArray, int sizeofArray); + /** * pointer to IPDF_JSPLATFORM interface **/ diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 59a7a22d0e..1b3d82659c 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -135,10 +135,9 @@ static void WritePng(const char* pdf_name, int num, const void* buffer_void, #ifdef _WIN32 static void WriteBmp(const char* pdf_name, int num, const void* buffer, int stride, int width, int height) { - if (stride < 0 || width < 0 || height < 0) - return; - if (height > 0 && width > INT_MAX / height) + if (!CheckDimensions(stride, width, height)) return; + int out_len = stride * height; if (out_len > INT_MAX / 3) return; @@ -278,7 +277,6 @@ bool ParseCommandLine(const std::vector& args, } options->font_directory = cur_arg.substr(11); } - #ifdef _WIN32 else if (cur_arg == "--emf") { if (options->output_format != OUTPUT_NONE) { -- cgit v1.2.3