ref: df14e6c0b9592cbb24d5381dfc6106b14f915e75
parent: cc9a0c26af5fc640c8518153781f38719be1944f
author: Simon Bünzli <[email protected]>
date: Wed Feb 19 03:42:52 EST 2014
Fix Savannah bug #41590. * src/type1/t1load.c (parse_encoding): Protect against invalid number.
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,13 @@
* src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'.
+2014-02-19 Simon Bünzli <[email protected]>
+
+ Fix Savannah bug #41590.
+
+ * src/type1/t1load.c (parse_encoding): Protect against invalid
+ number.
+
2014-02-12 Dave Arnold <[email protected]>
[cff] Optimize by using `FT_MulDiv'.
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1274,6 +1274,13 @@
{
charcode = (FT_Int)T1_ToInt( parser );
T1_Skip_Spaces( parser );
+
+ /* protect against invalid charcode */
+ if ( cur == parser->root.cursor )
+ {
+ parser->root.error = FT_THROW( Unknown_File_Format );
+ return;
+ }
}
cur = parser->root.cursor;