* src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
This commit is contained in:
parent
38a3dd5566
commit
0af21dcf13
|
@ -1,3 +1,7 @@
|
|||
2015-10-17 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
|
||||
|
||||
2015-10-17 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
|
||||
|
|
|
@ -401,6 +401,16 @@
|
|||
FT_ERROR(( "cid_parse_dict: No font dictionary found\n" ));
|
||||
return FT_THROW( Invalid_File_Format );
|
||||
}
|
||||
|
||||
/* allow at most 32bit offsets */
|
||||
if ( face->cid.fd_bytes > 4 || face->cid.gd_bytes > 4 )
|
||||
{
|
||||
FT_ERROR(( "cid_parse_dict:"
|
||||
" Values of `FDBytes' or `GDBytes' larger than 4\n"
|
||||
" "
|
||||
" are not supported\n" ));
|
||||
return FT_THROW( Invalid_File_Format );
|
||||
}
|
||||
}
|
||||
|
||||
return parser->root.error;
|
||||
|
|
Loading…
Reference in New Issue