freetype2/include/freetype
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
..
config Fix `FT_UINT_TO_POINTER' macro for Windows. 2017-05-12 07:52:36 +02:00
internal Handle some integer overflow run-time errors (#46149, #48979). 2017-05-29 13:29:28 +02:00
freetype.h Handle some integer overflow run-time errors (#46149, #48979). 2017-05-29 13:29:28 +02:00
ftadvanc.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftautoh.h * Version 2.8 released. 2017-05-13 06:29:04 +02:00
ftbbox.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftbdf.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftbitmap.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftbzip2.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftcache.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftcffdrv.h * Version 2.8 released. 2017-05-13 06:29:04 +02:00
ftchapters.h [pcf] Make long family names configurable. 2017-01-09 11:30:32 +01:00
ftcid.h Update copyright year. 2017-01-04 20:16:34 +01:00
fterrdef.h [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. 2017-04-03 11:37:33 +02:00
fterrors.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
ftfntfmt.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftgasp.h * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. 2017-02-03 08:31:18 +01:00
ftglyph.h Handle some integer overflow run-time errors (#46149, #48979). 2017-05-29 13:29:28 +02:00
ftgxval.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftgzip.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftimage.h Remove remnants of raster pool. 2017-05-14 21:57:27 +02:00
ftincrem.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftlcdfil.h * Version 2.8 released. 2017-05-13 06:29:04 +02:00
ftlist.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftlzw.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftmac.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftmm.h Minor documentation fixes. 2017-03-06 20:45:08 +01:00
ftmodapi.h [base] Add `FT_Set_Default_Properties' (#49187). 2017-01-23 12:53:18 +01:00
ftmoderr.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftotval.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftoutln.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftpcfdrv.h [pcf] Make long family names configurable. 2017-01-09 11:30:32 +01:00
ftpfr.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftrender.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftsizes.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftsnames.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
ftstroke.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
ftsynth.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftsystem.h Update copyright year. 2017-01-04 20:16:34 +01:00
fttrigon.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftttdrv.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
fttypes.h Update copyright year. 2017-01-04 20:16:34 +01:00
ftwinfnt.h Update copyright year. 2017-01-04 20:16:34 +01:00
t1tables.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
ttnameid.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00
tttables.h ftsnames.h, ttnameid.h, tttables.h: Revise documentation. 2017-01-17 12:39:53 +01:00
tttags.h Update copyright year. 2017-01-04 20:16:34 +01:00
ttunpat.h */*: s/backwards compatibility/backward compatibility/. 2017-05-03 23:54:29 +02:00