Commit f353a38e87a894a0a3280f5e27278831a1a2aaad

Werner Lemberg 2015-03-29T14:47:49

[cff] Fix Savannah bug #44629. * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h (CFF_MAX_SUBRS_CALLS): Set to 16.

diff --git a/ChangeLog b/ChangeLog
index abefef0..ef7c131 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2015-03-29  Werner Lemberg  <wl@gnu.org>
 
+	[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  <wl@gnu.org>
+
 	[type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
 
 	This commit allows `num_coords' to be larger or smaller than the
diff --git a/src/cff/cf2font.h b/src/cff/cf2font.h
index d8860ce..86cf02f 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 5c52d43..5f2655f 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