freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master c213c8a: * src/cid/cidgload.c (cid_load_glyph): Resto


From: Werner Lemberg
Subject: [freetype2] master c213c8a: * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
Date: Tue, 27 Apr 2021 08:55:16 -0400 (EDT)

branch: master
commit c213c8a9bb2fcb4e5befc7aaa605125d3c5a2bf4
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
---
 ChangeLog          | 4 ++++
 src/cid/cidgload.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b6f4d77..a1e66e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-04-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
+
 2021-04-27  Werner Lemberg  <wl@gnu.org>
 
        * src/psmodule.c (ps_unicodes_init): Ignore empty glyph names.
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 4dd9834..bd0a7e7 100644
--- 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]