freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master ac97a29: Another fix for handling invalid format 2 cm


From: Werner LEMBERG
Subject: [freetype2] master ac97a29: Another fix for handling invalid format 2 cmaps.
Date: Thu, 26 Apr 2018 03:05:33 -0400 (EDT)

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

    Another fix for handling invalid format 2 cmaps.
    
    Sigh.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
    
    * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
    an endless loop.
---
 ChangeLog         | 13 +++++++++++++
 src/sfnt/ttcmap.c |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index cd8b153..1b86d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2018-04-26  Werner Lemberg  <address@hidden>
+
+       Another fix for handling invalid format 2 cmaps.
+
+       Sigh.
+
+       Reported as
+
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003
+
+       * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid
+       an endless loop.
+
 2018-04-24  Ben Wagner  <address@hidden>
 
        [base] Avoid undefined behaviour in lcd filtering code (#53727).
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 07075cb..996e664 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -518,7 +518,7 @@
         FT_UInt   pos, idx;
 
 
-        if ( char_lo > start + count && charcode <= 0xFF )
+        if ( char_lo >= start + count && charcode <= 0xFF )
         {
           /* this happens only for a malformed cmap */
           charcode = 0x100;



reply via email to

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