Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1351)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp

Issue 2047723002: Check the hint table exists before using. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index f371e673ed650e9b0205576bf0953760561c53c1..c705a657aa2c7350cf9d4cfb27fbc359417a1d70 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)
Lei Zhang 2016/06/08 01:40:53 In the bug, you mentioned this code infinite loops
+ return FALSE;
+
FX_FILESIZE szHSStart =
pHintStreamRange->GetDirectObjectAt(0)
? pHintStreamRange->GetDirectObjectAt(0)->GetInteger()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698