summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/fpdf_formfill.h1
-rw-r--r--samples/pdfium_test.cc6
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) {