shithub: freetype+ttf2subf

Download patch

ref: a5ecfb4ce6f4f42f5346c664b57ab80c2bdf3664
parent: 266976b1633bcea0d017d0f37ac817b0b8af8694
author: Werner Lemberg <[email protected]>
date: Sat Oct 17 02:15:55 EDT 2015

* src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2015-10-15  Kostya Serebryany <[email protected]>
+2015-10-15  Werner Lemberg  <[email protected]>
+
+	* src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
+
+2015-10-15  Kostya Serebryany  <[email protected]>
 
 	[ftfuzzer] Add README.
 
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -395,7 +395,14 @@
 
         cur = parser->root.cursor;
       }
+
+      if ( !face->cid.num_dicts )
+      {
+        FT_ERROR(( "cid_parse_dict: No font dictionary found\n" ));
+        return FT_THROW( Invalid_File_Format );
+      }
     }
+
     return parser->root.error;
   }