summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-08 13:17:55 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-08 13:17:55 -0700
commitbc58de0409636f64200b14097e4c781ace12422d (patch)
tree6cd55cd43bfdfdd9958f75590de183580ddabc3e /core/fpdfapi/fpdf_parser
parent769b137a435fd53a419ebbd1deb8617771b73ef6 (diff)
downloadpdfium-bc58de0409636f64200b14097e4c781ace12422d.tar.xz
Set data availablity error.
If we have been told we have a hint table, but fail to read the table, set the document status to error instead of just returning. BUG=pdfium:512 Review-Url: https://codereview.chromium.org/2040373003
Diffstat (limited to 'core/fpdfapi/fpdf_parser')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index d3f9a54f4c..9018f06399 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
@@ -748,8 +748,10 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(IPDF_DataAvail::DownloadHints* pHints) {
}
CPDF_Array* pHintStreamRange = pDict->GetArrayBy("H");
- if (!pHintStreamRange)
+ if (!pHintStreamRange) {
+ m_docStatus = PDF_DATAAVAIL_ERROR;
return FALSE;
+ }
FX_FILESIZE szHSStart =
pHintStreamRange->GetDirectObjectAt(0)