summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-01 21:20:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 21:20:15 +0000
commitbbcbc72765ea6d95d3f6ff6989c0d6477f3f929c (patch)
tree5bebdde67607fa7fa7de444d77d4369332be59d4
parent022031d2ae75e649dd6a567c98928d8a00853823 (diff)
downloadpdfium-bbcbc72765ea6d95d3f6ff6989c0d6477f3f929c.tar.xz
Avoid perpetual spins for parserless CPDF_Pages
This is an obstacle to introducing dummy CPDF_Pages to underly all CPDFXFA_Pages, since we would then have a parserless CPDF_Page, whose parse could never succeed or fail. The m_ParseState would never change, and if the caller dutifully recalls us until that changes, we hang. Small separate CL since it might impact non-XFA cases unexpectedly. Change-Id: I002064e5d4caa44935f50bde0f3b00e3b8cb0bfe Reviewed-on: https://pdfium-review.googlesource.com/31850 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
index 310858f7c8..06fb3f26ea 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
@@ -35,8 +35,10 @@ bool CPDF_PageObjectHolder::IsPage() const {
}
void CPDF_PageObjectHolder::ContinueParse(PauseIndicatorIface* pPause) {
- if (!m_pParser)
+ if (!m_pParser) {
+ m_ParseState = CONTENT_PARSED;
return;
+ }
if (m_pParser->Continue(pPause))
return;