Since #737 gdImageColorTransparent does not correctly handle the case that im->transparent = -1
(which is the initial value and used to indicate no transparent colour has been set).
This leads to undefined behaviour via an out-of-bound write:
im->alpha[im->transparent] = gdAlphaOpaque;
(in practice I assume this merely overwrites an earlier struct member)
This can be triggered via loading a gif through gdImageCreateFromGifPtr
third_party/gd/source/gd.c:922:2: runtime error: index -1 out of bounds for type 'int [256]'
#0 0x5629c034a839 in gdImageColorTransparent third_party/gd/source/gd.c:922:29
#1 0x5629c034ebf0 in gdImageCreateFromGifCtx third_party/gd/source/gd_gif_in.c:328:4
#2 0x5629c034f14f in gdImageCreateFromGifPtr third_party/gd/source/gd_gif_in.c:186:7
Fixes#784.
There are small typos in:
- examples/copyrotated.c
- src/gd.c
- src/gd.h
- src/gd_avif.c
- src/gd_nnquant.c
- src/gd_tga.c
- src/gd_topal.c
- src/wbmp.c
- tests/avif/compare_avif_to_png.c
Fixes:
- Should read `requires` rather than `reqiures`.
- Should read `of the` rather than `ofthe`.
- Should read `memory` rather than `memmory`.
- Should read `maximum` rather than `maxmum`.
- Should read `intersection` rather than `intertersection`.
- Should read `hypotenuse` rather than `hypothenus`.
- Should read `flexibility` rather than `flexibilty`.
- Should read `always` rather than `alwasy`.
- Should read `also` rather than `alos`.
* add AOM dep for libavif
* add ninja build
* add nasm
* sudo ninja install
* we have it installed already on aws/ubuntu graviton
* we have it installed already on aws/ubuntu graviton, at the right step
* install libuv and libavif
* missing dav1d and update step names
* 20.04 does not have dav1d
* dav1d sudo ninja install
* We need shared lib for all codecs
* Enable AVIF in gd and enable deps on Graviton
* attempt to fix prefix install for dav1d and ensure it can be loaded
* ensure AOM codec is installed in /usr
* ensure YUV is installed in /usr
* AWS/Graviton has YUV already
* aom,yuv,avif has been removed from the graviton setup, installing it like on other flows. Keep same version.
* let keep AOM as it is used and installed using HEIF repo, with latest version too