From f353a38e87a894a0a3280f5e27278831a1a2aaad Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 29 Mar 2015 14:47:49 +0200 Subject: [PATCH] [cff] Fix Savannah bug #44629. * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h (CFF_MAX_SUBRS_CALLS): Set to 16. --- ChangeLog | 7 +++++++ src/cff/cf2font.h | 7 ++++++- src/cff/cffgload.h | 7 ++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index abefef0a3..ef7c1318d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-03-29 Werner Lemberg + + [cff] Fix Savannah bug #44629. + + * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h + (CFF_MAX_SUBRS_CALLS): Set to 16. + 2015-03-29 Werner Lemberg [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'. diff --git a/src/cff/cf2font.h b/src/cff/cf2font.h index d8860ce8e..86cf02f49 100644 --- a/src/cff/cf2font.h +++ b/src/cff/cf2font.h @@ -48,7 +48,12 @@ FT_BEGIN_HEADER #define CF2_OPERAND_STACK_SIZE 48 -#define CF2_MAX_SUBR 10 /* maximum subroutine nesting */ +#define CF2_MAX_SUBR 16 /* maximum subroutine nesting; */ + /* only 10 are allowed but there exist */ + /* fonts like `HiraKakuProN-W3.ttf' */ + /* (Hiragino Kaku Gothic ProN W3; */ + /* 8.2d6e1; 2014-12-19) that exceed */ + /* this limit */ /* typedef is in `cf2glue.h' */ diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h index 5c52d430d..5f2655f3d 100644 --- a/src/cff/cffgload.h +++ b/src/cff/cffgload.h @@ -29,7 +29,12 @@ FT_BEGIN_HEADER #define CFF_MAX_OPERANDS 48 -#define CFF_MAX_SUBRS_CALLS 32 +#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */ + /* only 10 are allowed but there exist */ + /* fonts like `HiraKakuProN-W3.ttf' */ + /* (Hiragino Kaku Gothic ProN W3; */ + /* 8.2d6e1; 2014-12-19) that exceed */ + /* this limit */ #define CFF_MAX_TRANS_ELEMENTS 32