Commit 8dfc760161a12e078d6277f1b42cf05577bcc89b

Werner Lemberg 2015-08-03T12:23:30

* src/truetype/ttgload.c (load_truetype_glyph) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs having a depth greater than 1.

diff --git a/ChangeLog b/ChangeLog
index 58c61ac..28e726d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-08-03  Werner Lemberg  <wl@gnu.org>
 
+	* src/truetype/ttgload.c (load_truetype_glyph)
+	[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
+	having a depth greater than 1.
+
+2015-08-03  Werner Lemberg  <wl@gnu.org>
+
 	Fix typo in clang bug from 2015-07-31 (#45678).
 
 	* src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 979b74b..204248f 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1702,7 +1702,7 @@
              FT_NEW_ARRAY( contours, outline.n_points ) )
           goto Exit1;
 
-        subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;
+        subglyph = gloader->current.subglyphs;
 
         for ( i = 0; i < limit; i++, subglyph++ )
         {
@@ -1751,7 +1751,7 @@
                          (FT_UInt)outline.n_points ) ) != 0 )
           goto Exit1;
 
-        subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;
+        subglyph = gloader->current.subglyphs;
 
         for ( i = 0; i < limit; i++, subglyph++ )
         {