diff options
author | Oliver Chang <ochang@chromium.org> | 2015-12-04 16:17:33 -0800 |
---|---|---|
committer | Oliver Chang <ochang@chromium.org> | 2015-12-04 16:17:33 -0800 |
commit | 2d16308298f236ae81aa11a53f2d4e25b502dfac (patch) | |
tree | 46fda008ea8fcdb21fd780f1459bb54a618cb3a7 /core/src/fpdfapi | |
parent | c88dfeefd13145cdb9492154c05ccbc33b80ceef (diff) | |
download | pdfium-2d16308298f236ae81aa11a53f2d4e25b502dfac.tar.xz |
Fix an incorrect check in CPDF_DataAvail::CheckHintTables.
R=tsepez@chromium.org, jun_fang@foxitsoftware.com
BUG=566179
Review URL: https://codereview.chromium.org/1504513002 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index d5664c29ab..b28bbf169b 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; } |