freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 3c61a2f: [cid] Fix commit from 2016-05-16.


From: Werner LEMBERG
Subject: [freetype2] master 3c61a2f: [cid] Fix commit from 2016-05-16.
Date: Fri, 26 Aug 2016 09:50:38 +0000 (UTC)

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

    [cid] Fix commit from 2016-05-16.
    
    * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
---
 ChangeLog          |    6 ++++++
 src/cid/cidparse.c |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3ee8b58..4979348 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-08-26  Werner Lemberg  <address@hidden>
 
+       [cid] Fix commit from 2016-05-16.
+
+       * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
+
+2016-08-26  Werner Lemberg  <address@hidden>
+
        [sfnt] Cache offset and size to bitmap data table.
 
        This commit avoids `EBDT' and friends being looked up again and
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index cca4363..cb07c45 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -199,7 +199,7 @@
     limit = parser->root.limit;
     cur   = parser->root.cursor;
 
-    while ( cur < limit - SFNTS_LEN )
+    while ( cur <= limit - SFNTS_LEN )
     {
       if ( parser->root.error )
       {
@@ -208,7 +208,7 @@
       }
 
       if ( cur[0] == 'S'                                           &&
-           cur < limit - STARTDATA_LEN                             &&
+           cur <= limit - STARTDATA_LEN                            &&
            ft_strncmp( (char*)cur, STARTDATA, STARTDATA_LEN ) == 0 )
       {
         if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )



reply via email to

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