summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_dataavail.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp
index 7b9ba32fb0..1a83fdf64b 100644
--- a/fpdfsdk/fpdf_dataavail.cpp
+++ b/fpdfsdk/fpdf_dataavail.cpp
@@ -162,6 +162,8 @@ DLLEXPORT int STDCALL FPDFAvail_IsPageAvail(FPDF_AVAIL avail,
FX_DOWNLOADHINTS* hints) {
if (!avail || !hints)
return PDF_DATA_ERROR;
+ if (page_index < 0)
+ return PDF_DATA_NOTAVAIL;
CFPDF_DownloadHintsWrap hints_wrap(hints);
return CFPDFDataAvailFromFPDFAvail(avail)->m_pDataAvail->IsPageAvail(
page_index, &hints_wrap);