diff options
author | thestig <thestig@chromium.org> | 2016-09-01 13:41:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-01 13:41:11 -0700 |
commit | e0cb687c71d555b55cc30ec59c9b338a0e83f77f (patch) | |
tree | 73c1e1ecd9b1b419ac4cb752e0ba8ade519bcbe6 /fpdfsdk/fpdf_dataavail.cpp | |
parent | eadff195ea8a8e0d1f400bd8910873ce8e38635f (diff) | |
download | pdfium-e0cb687c71d555b55cc30ec59c9b338a0e83f77f.tar.xz |
Use unsigned page indexes in CPDF_HintTables.
Fix up callers from CPDF_DataAvail.
Review-Url: https://codereview.chromium.org/2294383003
Diffstat (limited to 'fpdfsdk/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/fpdf_dataavail.cpp | 2 |
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); |