summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorOliver Chang <ochang@chromium.org>2015-12-04 16:38:41 -0800
committerOliver Chang <ochang@chromium.org>2015-12-04 16:38:41 -0800
commitc73a1442aeea509847e3232f3a38baa823692542 (patch)
tree0587514722c61abe6c0e67e8e05f16ca43a89b54 /core/src
parent59d09dfd276aa262d6fb95c4a78784fdc1824a26 (diff)
downloadpdfium-c73a1442aeea509847e3232f3a38baa823692542.tar.xz
Merge to XFA: Fix an incorrect check in CPDF_DataAvail::CheckHintTables.
R=tsepez@chromium.org TBR=tsepez@chromium.org BUG=566179 Original Review URL: https://codereview.chromium.org/1504513002 . (cherry picked from commit 2d16308298f236ae81aa11a53f2d4e25b502dfac) Review URL: https://codereview.chromium.org/1501123002 .
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp9
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;
}