From bbcbc72765ea6d95d3f6ff6989c0d6477f3f929c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 1 May 2018 21:20:15 +0000 Subject: 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 Commit-Queue: Tom Sepez --- core/fpdfapi/page/cpdf_pageobjectholder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') 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; -- cgit v1.2.3