summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-01-29 18:02:20 -0800
committerTom Sepez <tsepez@chromium.org>2015-01-29 18:02:20 -0800
commit14b2bb0adcd723a463140929cbd9453a799a34e6 (patch)
treea50085210476a07059eb2467a69b3f2f7cdcdfa5 /core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
parent1d43e82efde0ddbad4a3e32d860a597c3bb6ab83 (diff)
downloadpdfium-14b2bb0adcd723a463140929cbd9453a799a34e6.tar.xz
Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject().
Introduce a local static to track the recursion depth, thereby removing the burden for callers to track and pass a level parameter correctly through all call paths. Also increase the depth tolerated, since we know there were paths that were under-counting this value. BUG=451265 R=thestig@chromium.org Review URL: https://codereview.chromium.org/868253009
Diffstat (limited to 'core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 6b895b525b..8024c991f4 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -988,7 +988,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, CPDF_Pag
matrix.Translate(orig_x - mtPattern2Device.e, orig_y - mtPattern2Device.f);
m_pDevice->SaveState();
CPDF_RenderStatus status;
- status.Initialize(m_Level + 1, m_pContext, m_pDevice, NULL, NULL, this, pStates, &m_Options,
+ status.Initialize(m_pContext, m_pDevice, NULL, NULL, this, pStates, &m_Options,
pPattern->m_pForm->m_Transparency, m_bDropObjects, pFormResource);
status.RenderObjectList(pPattern->m_pForm, &matrix);
m_pDevice->RestoreState();