* src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
This commit is contained in:
parent
c9ca6ffc94
commit
812ed34189
@ -1,3 +1,7 @@
|
||||
2014-12-11 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size.
|
||||
|
||||
2014-12-11 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check.
|
||||
|
@ -667,6 +667,13 @@
|
||||
status = BEFORE_TABLE_DIR;
|
||||
face->ttf_size = 12 + 16 * num_tables;
|
||||
|
||||
if ( (FT_ULong)( limit - parser->root.cursor ) < face->ttf_size )
|
||||
{
|
||||
FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
if ( FT_REALLOC( face->ttf_data, 12, face->ttf_size ) )
|
||||
goto Fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user