diff --git a/ChangeLog b/ChangeLog index 945962f9e..c1d5aeabd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,13 @@ * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'. +2014-02-19 Simon Bünzli + + Fix Savannah bug #41590. + + * src/type1/t1load.c (parse_encoding): Protect against invalid + number. + 2014-02-12 Dave Arnold [cff] Optimize by using `FT_MulDiv'. diff --git a/src/type1/t1load.c b/src/type1/t1load.c index d4171d967..e2da9565e 100644 --- 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;