* src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
diff --git a/ChangeLog b/ChangeLog
index 4979348..5a07f8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
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.
* src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index d4f1ad1..21397c2 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -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 );