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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

Issue 1504513002: Fix an incorrect check in CPDF_DataAvail::CheckHintTables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: simplify logic Created 5 years 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/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index d5664c29ab46c0dd09d090b776bea1c11094ffe9..b28bbf169b8bb4c1c9819569c14689ad7b586589 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -3599,13 +3599,10 @@ FX_BOOL CPDF_DataAvail::CheckHintTables(IFX_DownloadHints* pHints) {
nonstd::unique_ptr<CPDF_HintTables> pHintTables(
new CPDF_HintTables(this, pDict));
CPDF_Stream* pHintStream = (CPDF_Stream*)ParseIndirectObjectAt(szHSStart, 0);
- FX_BOOL bLoaded = FALSE;
- if (pHintTables && pHintStream && pHintStream->GetType() == PDFOBJ_STREAM) {
- bLoaded = pHintTables->LoadHintStream(pHintStream);
- }
- if (!bLoaded) {
+ if (pHintStream && pHintStream->GetType() == PDFOBJ_STREAM &&
+ pHintTables->LoadHintStream(pHintStream))
m_pHintTables.reset(pHintTables.release());
- }
+
m_docStatus = PDF_DATAAVAIL_DONE;
return TRUE;
}
« 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