freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 9be385c: * src/pcf/pcfread.c (pcf_load_font): Fix num


From: Werner LEMBERG
Subject: [freetype2] master 9be385c: * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
Date: Sun, 22 Jul 2018 06:49:58 -0400 (EDT)

branch: master
commit 9be385c94d63dd4951bb578a8417cf4a944ab827
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
    
    This is an oversight of the module change 2018-07-21.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
---
 ChangeLog         | 10 ++++++++++
 src/pcf/pcfread.c |  9 +--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 635a401..d442b40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2018-07-22  Werner Lemberg  <address@hidden>
 
+       * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
+
+       This is an oversight of the module change 2018-07-21.
+
+       Reported as
+
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
+
+2018-07-22  Werner Lemberg  <address@hidden>
+
        [cid] Sanitize `BlueShift' and `BlueFuzz'.
 
        This code is taken from the type1 module.
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 06a1a5e..e55b472 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -1538,14 +1538,7 @@ THE SOFTWARE.
       else
         root->family_name = NULL;
 
-      /*
-       * Note: We shift all glyph indices by +1 since we must
-       * respect the convention that glyph 0 always corresponds
-       * to the `missing glyph'.
-       *
-       * This implies bumping the number of `available' glyphs by 1.
-       */
-      root->num_glyphs = (FT_Long)( face->nmetrics + 1 );
+      root->num_glyphs = (FT_Long)face->nmetrics;
 
       root->num_fixed_sizes = 1;
       if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )



reply via email to

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