From d61f958385be285f3f3897ef3a3f010048608f1c Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 3 Oct 2016 12:10:55 -0700 Subject: Detect resursive loading of type3 font char to avoid infinite loop The original way of detecting loops was passing a level parameter through various functions. This missed some cases which also lead to load type3 font char, for example, FindFont() may call CheckType3FontMetrics() which may eventually lead to LoadChar(). The new way is to store the char loading depth, and abort when the depth exceeds the max. BUG=chromium:651304 Review-Url: https://codereview.chromium.org/2384853002 --- core/fpdfapi/fpdf_page/cpdf_textobject.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_page/cpdf_textobject.h') diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.h b/core/fpdfapi/fpdf_page/cpdf_textobject.h index c09da96040..05a08a9c89 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textobject.h +++ b/core/fpdfapi/fpdf_page/cpdf_textobject.h @@ -56,8 +56,7 @@ class CPDF_TextObject : public CPDF_PageObject { void CalcPositionData(FX_FLOAT* pTextAdvanceX, FX_FLOAT* pTextAdvanceY, - FX_FLOAT horz_scale, - int level = 0); + FX_FLOAT horz_scale); FX_FLOAT m_PosX; FX_FLOAT m_PosY; -- cgit v1.2.3