* src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.

This commit is contained in:
Werner Lemberg 2016-08-26 11:59:50 +02:00
parent 3c61a2f51d
commit 57aa83911a
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2016-08-26 Werner Lemberg <wl@gnu.org>
* src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
2016-08-26 Werner Lemberg <wl@gnu.org>
[cid] Fix commit from 2016-05-16.

View File

@ -777,7 +777,8 @@
CID_FaceDict dict = cid->font_dicts + n;
if ( dict->sd_bytes < 0 )
if ( dict->sd_bytes < 0 ||
( dict->num_subrs && dict->sd_bytes < 1 ) )
{
FT_ERROR(( "cid_parse_dict: Invalid `SDBytes' value\n" ));
error = FT_THROW( Invalid_File_Format );