shithub: freetype+ttf2subf

Download patch

ref: 57aa83911a080b4af23fbc750cd7fb08e084c59a
parent: 3c61a2f51d0da10b9e4d6ef8c526588a3a337bb9
author: Werner Lemberg <[email protected]>
date: Fri Aug 26 07:59:50 EDT 2016

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-08-26  Werner Lemberg  <[email protected]>
 
+	* src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
+
+2016-08-26  Werner Lemberg  <[email protected]>
+
 	[cid] Fix commit from 2016-05-16.
 
 	* src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
--- 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 );