shithub: freetype+ttf2subf

Download patch

ref: f96094eef0541af5fa09c4a3fed61ac143de8121
parent: b9880aa0f8f52accc9074334f9e9f962b1b5a8e6
author: Werner Lemberg <[email protected]>
date: Tue Oct 13 03:13:56 EDT 2015

[truetype] Fix commit from 2015-10-10.

* src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
handling body to condition.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-13  Werner Lemberg  <[email protected]>
+
+	[truetype] Fix commit from 2015-10-10.
+
+	* src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
+	handling body to condition.
+
 2015-10-12  Werner Lemberg  <[email protected]>
 
 	[unix] Make MKDIR_P actually work.
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -489,6 +489,11 @@
     /* and a single variation needs at least 4 bytes per glyph */
     if ( (FT_ULong)gvar_head.glyphCount *
            ( ( gvar_head.flags & 1 ) ? 8 : 6 ) > table_len )
+    {
+      FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
 
     FT_TRACE2(( "loaded\n" ));