From 0687e76dc259c678b3f29a6608331f07ffd8f1e2 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 7 Jun 2016 10:43:42 -0700 Subject: Check the hint table exists before using. It's possible for the hint table to not exist event though we have a hint key in the object database. If the table does not exist then return false from CheckHIntTables(). BUG=pdfium:512 Review-Url: https://codereview.chromium.org/2047723002 --- core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/fpdfapi') diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp index f371e673ed..c705a657aa 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp @@ -748,6 +748,9 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(IPDF_DataAvail::DownloadHints* pHints) { } CPDF_Array* pHintStreamRange = pDict->GetArrayBy("H"); + if (!pHintStreamRange) + return FALSE; + FX_FILESIZE szHSStart = pHintStreamRange->GetDirectObjectAt(0) ? pHintStreamRange->GetDirectObjectAt(0)->GetInteger() -- cgit v1.2.3