diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-24 15:28:54 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-24 15:28:54 -0800 |
commit | 38ad68cdea4fe106293d55ae1b96bab2791f96c7 (patch) | |
tree | 8d2f370304d4c34e5ac46a50fbe87f2d719a71f3 | |
parent | e00cef685e1e4799e3ede59bb3bf18fe17ec6f19 (diff) | |
download | pdfium-38ad68cdea4fe106293d55ae1b96bab2791f96c7.tar.xz |
make master samples/ and public/ look more like XFA
BUG=
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1477603002 .
-rw-r--r-- | public/fpdf_formfill.h | 1 | ||||
-rw-r--r-- | 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<std::string>& args, } options->font_directory = cur_arg.substr(11); } - #ifdef _WIN32 else if (cur_arg == "--emf") { if (options->output_format != OUTPUT_NONE) { |