Fix infinite recursion in CPDF_RenderStatus::RenderSingleObject().
authorTom Sepez <tsepez@chromium.org>
Fri, 30 Jan 2015 02:02:20 +0000 (18:02 -0800)
committerTom Sepez <tsepez@chromium.org>
Fri, 30 Jan 2015 02:02:20 +0000 (18:02 -0800)
commit14b2bb0adcd723a463140929cbd9453a799a34e6
treea50085210476a07059eb2467a69b3f2f7cdcdfa5
parent1d43e82efde0ddbad4a3e32d860a597c3bb6ab83
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
core/src/fpdfapi/fpdf_render/fpdf_render.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
core/src/fpdfapi/fpdf_render/render_int.h