freetype/src/gzip
Ben Wagner 06e21ffedf [gzip] Use exact type for ft_gzip_alloc and ft_gzip_free.
While a function pointer may be cast to another function pointer
type, it is required to cast the function pointer back to the
original function pointer type before calling it.  If a parameter is
a pointer the exact pointer type is required.  Using a pointer to a
different underlying type is technically undefined behavior.  The
wrapper functions `ft_gzip_alloc` and `ft_gzip_free` took
`FT_Memory` (a `FT_MemoryRec_*`) instead of `voidpf` (`void*`), so
when gzip calls these callbacks through `alloc_func` or `free_func`
it invokes undefined behavior.  On most platforms this works out as
expected, but newer undefined behavior detectors and targets like
wasm can detect this and will produce an error.

* src/gzip/ftgzip.c (ft_gzip_alloc, ft_gzip_free): Update signatures
to exactly match `alloc_func` and `free_func`, respectively.
Internally, cast the `void*` opaque pointer to `FT_Memory`.
2021-05-19 09:07:33 +02:00
..
adler32.c
ftgzip.c [gzip] Use exact type for ft_gzip_alloc and ft_gzip_free. 2021-05-19 09:07:33 +02:00
ftzconf.h [gzip] Improve building with external zlib (#49673). 2016-12-01 11:36:37 +01:00
infblock.c * Version 2.10.1 released. 2019-07-01 15:56:34 +02:00
infblock.h
infcodes.c Silence gcc 7's fall-through warnings in `switch' blocks. 2019-05-29 07:51:59 +02:00
infcodes.h
inffixed.h
inflate.c Silence gcc 7's fall-through warnings in `switch' blocks. 2019-05-29 07:51:59 +02:00
inftrees.c
inftrees.h
infutil.c
infutil.h Minor fixes for recent compilers. 2019-11-23 10:00:02 +01:00
rules.mk Update all copyright notices. 2021-01-17 07:18:48 +01:00
zlib.h [gzip] Improve building with external zlib (#49673). 2016-12-01 11:36:37 +01:00
zutil.c
zutil.h