freetype2/include/freetype
Werner Lemberg 8c8f51c558 Avoid undefined left-shifts.
We really have to use double casts to avoid issues with C's and C++'s
signedness propagation rules in implicit casts.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182

* include/freetype/config/public-macros.h (FT_STATIC_CAST,
FT_REINTERPRET_CAST): Modify macro to take two arguments.
Update all callers.
(FT_STATIC_BYTE_CAST): New macro.

* include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
* include/freetype/fttypes.h (FT_MAKE_TAG): Ditto.
Use `FT_Tag` for casting.

* src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed.
(FT_STATIC_BYTE_CAST): New macro.

* src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with...
(FT_STATIC_BYTE_CAST): ... this.
2021-11-20 07:58:31 +01:00
..
config Avoid undefined left-shifts. 2021-11-20 07:58:31 +01:00
internal Explicitly define `FT_MSB` for Clang. 2021-11-11 23:06:36 -05:00
freetype.h Avoid undefined left-shifts. 2021-11-20 07:58:31 +01:00
ftadvanc.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbbox.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbdf.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbitmap.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbzip2.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftcache.h Typo. 2021-04-18 10:24:31 -04:00
ftchapters.h [base] Add public API to change the levels of tracing components. 2020-12-01 09:25:53 +01:00
ftcid.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftcolor.h [sfnt] Clarify `COLR` v1 FT_Paint* format representations 2021-11-03 08:28:10 +00:00
ftdriver.h Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
fterrdef.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fterrors.h fterrors.h: Fix documentation extraction of `FT_Error_String`. 2021-06-23 08:14:42 +02:00
ftfntfmt.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgasp.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftglyph.h Decorate const arguments. 2021-08-22 13:12:45 -04:00
ftgxval.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgzip.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftimage.h Avoid undefined left-shifts. 2021-11-20 07:58:31 +01:00
ftincrem.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftlcdfil.h Whitespace formatting. 2021-08-22 22:32:07 -04:00
ftlist.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftlogging.h More various documentation improvements and fixes. 2021-06-08 18:23:16 +02:00
ftlzw.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmac.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmm.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmodapi.h Avoid undefined left-shifts. 2021-11-20 07:58:31 +01:00
ftmoderr.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftotval.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftoutln.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftparams.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftpfr.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftrender.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsizes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsnames.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftstroke.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsynth.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsystem.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fttrigon.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fttypes.h Avoid undefined left-shifts. 2021-11-20 07:58:31 +01:00
ftwinfnt.h Whitespace formatting. 2021-08-22 22:32:07 -04:00
t1tables.h [cid] Signedness revisions. 2021-10-10 23:11:10 -04:00
ttnameid.h Whitespace formatting. 2021-08-22 22:32:07 -04:00
tttables.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
tttags.h Update all copyright notices. 2021-01-17 07:18:48 +01:00