Fix Savannah bug #36832.

* src/type1/t1load.c (parse_charstrings): Reject negative number of
glyphs.
This commit is contained in:
Werner Lemberg 2012-07-18 10:38:54 +02:00
parent a8c243514c
commit 01b508f247
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2012-07-16 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #36832.
* src/type1/t1load.c (parse_charstrings): Reject negative number of
glyphs.
2012-07-13 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #36829.

View File

@ -1514,6 +1514,12 @@
num_glyphs = (FT_Int)T1_ToInt( parser );
if ( num_glyphs < 0 )
{
error = T1_Err_Invalid_File_Format;
goto Fail;
}
/* some fonts like Optima-Oblique not only define the /CharStrings */
/* array but access it also */
if ( num_glyphs == 0 || parser->root.error )