shithub: freetype+ttf2subf

Download patch

ref: c213c8a9bb2fcb4e5befc7aaa605125d3c5a2bf4
parent: 2ec6feaf39910d06119164912dad6e9841eec2d0
author: Alexei Podtelezhnikov <[email protected]>
date: Tue Apr 27 04:54:19 EDT 2021

* src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-27  Alexei Podtelezhnikov  <[email protected]>
+
+	* src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
+
 2021-04-27  Werner Lemberg  <[email protected]>
 
 	* src/psmodule.c (ps_unicodes_init): Ignore empty glyph names.
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -131,7 +131,8 @@
 
       glyph_length = off2 - off1;
 
-      if ( FT_QALLOC( charstring, glyph_length )         ||
+      if ( glyph_length == 0                             ||
+           FT_QALLOC( charstring, glyph_length )         ||
            FT_STREAM_READ_AT( cid->data_offset + off1,
                               charstring, glyph_length ) )
         goto Exit;