freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 5e3a38b: [psaux] Mask numeric overflow.


From: Armin
Subject: [freetype2] master 5e3a38b: [psaux] Mask numeric overflow.
Date: Thu, 21 Feb 2019 05:05:08 -0500 (EST)

branch: master
commit 5e3a38b194f3a68e9a5a03a1bd0c6bb2eb3dec1f
Author: Armin Hasitzka <address@hidden>
Commit: Armin Hasitzka <address@hidden>

    [psaux] Mask numeric overflow.
    
    * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
    overflow.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
---
 ChangeLog             | 11 +++++++++++
 src/psaux/cffdecode.c |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f43a7ef..cb17e77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2019-02-21  Armin Hasitzka  <address@hidden>
+
+       [psaux] Mask numeric overflow.
+
+       * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
+       overflow.
+
+       Reported as
+
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
+
 2019-02-16  Wink Saville  <address@hidden>
 
        * src/autofit/afwarp.h (af_warper_compute): Fix declaration.
diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c
index 6cc1d32..b11b75f 100644
--- a/src/psaux/cffdecode.c
+++ b/src/psaux/cffdecode.c
@@ -1556,9 +1556,9 @@
             }
 
             if ( dx < 0 )
-              dx = -dx;
+              dx = NEG_LONG( dx );
             if ( dy < 0 )
-              dy = -dy;
+              dy = NEG_LONG( dy );
 
             /* strange test, but here it is... */
             horizontal = ( dx > dy );



reply via email to

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