freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 90e437e: [sfnt] Make `tt_cmap4_char_map_linear' more


From: Werner LEMBERG
Subject: [freetype2] master 90e437e: [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
Date: Thu, 01 Oct 2015 18:00:41 +0000

branch: master
commit 90e437e3cdf0710b5c9b6197b95a58d594312626
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
    
    * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
    border conditions (i.e., if the loop exits naturally).
---
 ChangeLog         |    7 +++++++
 src/sfnt/ttcmap.c |   10 ++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e976629..901bac5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2015-10-01  Werner Lemberg  <address@hidden>
 
+       [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
+
+       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
+       border conditions (i.e., if the loop exits naturally).
+
+2015-10-01  Werner Lemberg  <address@hidden>
+
        * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
        They should be a subset of `af_deva_uniranges'.
 
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 3e8ea83..c4d9abd 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -1130,18 +1130,16 @@
             /* we have an invalid glyph index; if there is an overflow, */
             /* we can adjust `charcode', otherwise the whole segment is */
             /* invalid                                                  */
+            gindex = 0;
+
             if ( (FT_Int)charcode + delta < 0 &&
                  (FT_Int)end + delta >= 0     )
-            {
               charcode = (FT_UInt)( -delta );
-              gindex   = 0;
-            }
+
             else if ( (FT_Int)charcode + delta < 0x10000L &&
                       (FT_Int)end + delta >= 0x10000L     )
-            {
               charcode = (FT_UInt)( 0x10000L - delta );
-              gindex   = 0;
-            }
+
             else
               continue;
           }



reply via email to

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