freetype/src
Werner Lemberg fbe2fe4c75 Handle some integer overflow run-time errors (#46149, #48979).
This commit (mainly for 32bit CPUs) is the first of a series of
similar commits to handle known integer overflows.  Basically, all
of them are harmless, since they affect rendering of glyphs only,
not posing security threats.  It is expected that fuzzying will show
up more overflows, to be fixed in due course.

The idea is to mark places where overflows can occur, using macros
that simply cast to unsigned integers, because overflow arithmetic
is well defined in this case.  Doing so suppresses run-time errors
of sanitizers without adding computational overhead.

* include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT,
OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG,
OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros.

* src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply,
FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled,
ft_corner_orientation): Use new macros.

* src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros.
2017-05-29 13:29:28 +02:00
..
autofit [autofit] More code sorting. 2017-05-17 07:56:53 +02:00
base Handle some integer overflow run-time errors (#46149, #48979). 2017-05-29 13:29:28 +02:00
bdf [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). 2017-05-24 07:40:46 +02:00
bzip2 Update copyright year. 2017-01-04 20:16:34 +01:00
cache Improve `make multi'. 2017-03-18 07:06:49 +01:00
cff [cff] s/cf2_floatToFixed/cf2_doubleToFixed/. 2017-05-28 07:46:22 +02:00
cid Introduce `FT_Size_InternalRec' structure. 2017-04-22 12:48:50 +02:00
gxvalid Improve `make multi'. 2017-03-18 07:06:49 +01:00
gzip Typos. 2017-01-24 23:56:59 -05:00
lzw Update copyright year. 2017-01-04 20:16:34 +01:00
otvalid Improve `make multi'. 2017-03-18 07:06:49 +01:00
pcf [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). 2017-05-24 07:40:46 +02:00
pfr Improve `make multi'. 2017-03-18 07:06:49 +01:00
psaux Introduce `FT_Size_InternalRec' structure. 2017-04-22 12:48:50 +02:00
pshinter [autofit] Remove `slight' auto-hint mode again. 2017-05-02 12:32:19 +02:00
psnames Improve `make multi'. 2017-03-18 07:06:49 +01:00
raster Remove remnants of raster pool. 2017-05-14 21:57:27 +02:00
sfnt [sfnt] Return proper scaling values for SBIX bitmaps. 2017-05-15 21:26:01 +02:00
smooth [smooth] Implement minimal dynamic padding for LCD filtering. 2017-05-20 00:35:21 -04:00
tools [ftfuzzer] Fix clang warnings. 2017-04-07 17:13:38 +02:00
truetype [truetype] Fix handling of design coordinates (#51127). 2017-05-27 15:50:25 +02:00
type1 Introduce `FT_Size_InternalRec' structure. 2017-04-22 12:48:50 +02:00
type42 Improve `make multi'. 2017-03-18 07:06:49 +01:00
winfonts Update copyright year. 2017-01-04 20:16:34 +01:00
Jamfile Update copyright year. 2017-01-04 20:16:34 +01:00