Debian Patches

Status for libgd2/2.3.3-16

Patch Description Author Forwarded Bugs Origin Last update
0001-Fix-error-ISO-C99-requires-at-least-one-argument-for.patch Fix error: ISO C99 requires at least one argument for the "..." in a variadic macro Ondřej Surý <ondrej@sury.org> no 2016-10-31
0002-Disable-failing-test-that-breaks-some-builds.patch Disable failing test that breaks some builds Ondřej Surý <ondrej@sury.org> no 2017-09-04
0003-tests-make-a-little-change-for-autopkgtest.patch tests-make-a-little-change-for-autopkgtest
===================================================================
GD Team <team+gd@tracker.debian.org> no 2020-04-24
0004-Revert-upstream-318-fix-to-fix-the-PHP-5.6-8.0-FTBFS.patch Revert upstream #318 fix to fix the PHP 5.6 - 8.0 FTBFS. Ondřej Surý <ondrej@sury.org> no 2022-07-11
0005-Fix-847-enable-back-GD_BICUBIC-interpolation-methods.patch Fix #847: enable back GD_BICUBIC* interpolation methods Cyprien Nicolas <cyprien@octopuce.fr> no 2022-10-27
0006-libgd-patch-for-CVE-2026-9672.patch libgd patch for CVE-2026-9672
Patch by Pierre Joye (pierrejoye).

(cherry picked from commit fcd691b377d02285740744bee17c0f298be227d5)
Ilija Tovilo <ilija.tovilo@me.com> no 2026-07-28
0007-Fix-810-Wrong-image-freed-src_cloned-should-be-freed.patch Fix #810, Wrong image freed, src_cloned should be freed if set. (#811) Pierre Joye <pierre.php@gmail.com> no 2022-01-29
0008-Fix-fix-for-320-929.patch Fix fix for #320 (#929)
At least `gdImageRotateNearestNeighbour()` requires a truecolor image,
so we should actually pass the truecolor clone. To be safe regarding
future changes, we also do this for `gdImageRotateGeneric()`. And if
rotation of zero degrees is requested, we return the already cloned
image, instead of creating another clone.

We also extend the existing test case to cover all relevant code paths.
"Christoph M. Becker" <cmbecker69@gmx.de> no 2025-01-09
0009-tests-fix-the-temporary-directory-check-in-gdTestIsD.patch tests: fix the temporary directory check in gdTestIsDir()
The lstat() failure branch was missing its return statement, so the
S_ISDIR() check that follows became its body. gdTestIsDir() therefore
returned 0 for every path that exists and looked at an uninitialized
struct stat for every path that does not.

The function is only reached when neither TMPDIR nor TMP is set, as is
the case under autopkgtest, and it then made every test that needs a
temporary file exit with "tmpdir failed to be used or initialized
(/tmp)".

Upstream master has an equivalent fix, but it only came in as part of
the merge commit efffd21c3692df73ebaa146823386a2db057c125 and cannot be
cherry-picked.
Ondřej Surý <ondrej@sury.org> not-needed 2026-11-10
0010-788-fix-bug-in-HEIF-usage-stride-is-require-801.patch #788 fix bug in HEIF usage, stride is require (#801)
fix bug #788 in HEIF usage, stride is require

Only the src/gd_heif.c change is taken; the test added upstream needs a
binary image that cannot be carried in a quilt patch.
Pierre Joye <pierre.php@gmail.com> no upstream, https://github.com/libgd/libgd/commit/f1a53c082173567b8ad07eaba8fc7ba66457a730 2022-01-22
0011-Initialize-the-XpmInfo-valuemask-in-gdImageCreateFro.patch Initialize the XpmInfo valuemask in gdImageCreateFromXpm()
XpmInfo.valuemask tells XpmReadFileToXpmImage() which optional parts of
the file (comments, extensions) the caller wants back, and
XpmFreeXpmInfo() consults it again when freeing them. It was passed in
uninitialized, so libXpm branched on whatever happened to be on the
stack.

Found by running the xpm tests under valgrind ("Conditional jump or
move depends on uninitialised value(s)" in XpmReadFileToXpmImage and
XpmFreeXpmInfo).
Ondřej Surý <ondrej@sury.org> no 2026-11-10
0012-Do-not-write-uninitialized-memory-into-the-TIFF-colo.patch Do not write uninitialized memory into the TIFF colour map
tiffWriter() allocated the three colour maps of a palette image with
gdMalloc() and filled in only the first colorsTotal entries, but libtiff
writes all 2^BitsPerSample entries of each map to the file. For any
palette image with fewer colours than that, uninitialized heap memory
ended up in the written TIFF.

Allocate the maps zeroed, and with the size libtiff actually expects
(2^BitsPerSample entries of uint16_t) instead of 3 * 2^BitsPerSample
bytes.

Found by running tiff/tiff_dpi and tiff/tiff_im2im under valgrind
("Syscall param write(buf) points to uninitialised byte(s)").
Ondřej Surý <ondrej@sury.org> no 2026-11-10

All known versions for source package 'libgd2'

Links