package/perl-gd: drop gdlib-config
PATCH 1/2 package/perl-gd: drop gdlib-config
Drop gdlib-config as it won't be available after the bump to version 2.3.0. If gdlib-config is not available, perl-gd fallbacks on glibc.pc since version 2.57:
https://github.com/lstein/Perl-GD/commit/069e6cfff61e10c71474d75ed20d2ca11abc8f0e
Signed-off-by Fabrice Fontaine <[email protected]>
--- package/perl-gd/perl-gd.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
package/perl-gd/perl-gd.mk +2 -3
@@ -7,7 +7,7 @@ PERL_GD_VERSION = 2.73 PERL_GD_SOURCE = GD-$(PERL_GD_VERSION).tar.gz PERL_GD_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN -PERL_GD_DEPENDENCIES = zlib libpng freetype gd +PERL_GD_DEPENDENCIES = host-pkgconf zlib libpng freetype gd PERL_GD_LICENSE = Artistic or GPL-1.0+ PERL_GD_LICENSE_FILES = LICENSE PERL_GD_DISTNAME = GD
@@ -16,7 +16,6 @@ PERL_GD_CONF_OPTS = \ -lib_gd_path=$(STAGING_DIR)/usr \ -lib_ft_path=$(STAGING_DIR)/usr \ -lib_png_path=$(STAGING_DIR)/usr \ - -lib_zlib_path=$(STAGING_DIR)/usr \ - -gdlib_config_path=$(STAGING_DIR)/usr/bin + -lib_zlib_path=$(STAGING_DIR)/usr $(eval $(perl-package))
Signature · 1 line
2.29.2
PATCH 2/2 package/gd: bump to version 2.3.0
- Drop patches (already in version)
- gdlib-config has been dropped since
https://github.com/libgd/libgd/commit/d62f608c7c4a814c70d4ba777725e3e62d9e2cde
- Update license hash
- Update indentation in hash file (two spaces)
Signed-off-by Fabrice Fontaine <[email protected]>
--- ...-check-return-value-in-gdImageBmpPtr.patch | 80 ------- ...l-infinite-loop-in-gdImageCreateFrom.patch | 61 ----- ...lized-read-in-gdImageCreateFromXbm-C.patch | 41 ---- ...Potential-double-free-in-gdImage-Ptr.patch | 219 ------------------ ...-pointer-dereference-in-gdImageClone.patch | 44 ---- ...f-Bounds-Write-on-Heap-CVE-2019-6977.patch | 39 ---- package/gd/gd.hash | 4 +- package/gd/gd.mk | 19 +- 8 files changed, 4 insertions(+), 503 deletions(-) delete mode 100644 package/gd/0001-bmp-check-return-value-in-gdImageBmpPtr.patch delete mode 100644 package/gd/0002-Fix-420-Potential-infinite-loop-in-gdImageCreateFrom.patch delete mode 100644 package/gd/0003-Fix-501-Uninitialized-read-in-gdImageCreateFromXbm-C.patch delete mode 100644 package/gd/0004-Fix-492-Potential-double-free-in-gdImage-Ptr.patch delete mode 100644 package/gd/0005-Fix-potential-NULL-pointer-dereference-in-gdImageClone.patch delete mode 100644 package/gd/0006-Fix-497-gdImageColorMatch-Out-Of-Bounds-Write-on-Heap-CVE-2019-6977.patch
package/gd/0001-bmp-check-return-value-in-gdImageBmpPtr.patch deleted +0 -80
@@ -1,80 +0,0 @@ -From ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <[email protected]> -Date: Sat, 14 Jul 2018 13:54:08 -0400 -Subject: [PATCH] bmp: check return value in gdImageBmpPtr - -Closes #447. - -CVE-2018-1000222 - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - src/gd_bmp.c | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -diff --git a/src/gd_bmp.c b/src/gd_bmp.c -index bde0b9d..78f40d9 100644 ---- a/src/gd_bmp.c -+++ b/src/gd_bmp.c -@@ -47,6 +47,8 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp - static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp_hdr_t *header); - static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info); - -+static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression); -+ - #define BMP_DEBUG(s) - - static int gdBMPPutWord(gdIOCtx *out, int w) -@@ -87,8 +89,10 @@ BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression) - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); - if (out == NULL) return NULL; -- gdImageBmpCtx(im, out, compression); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageBmpCtx(im, out, compression)) -+ rv = gdDPExtractData(out, size); -+ else -+ rv = NULL; - out->gd_free(out); - return rv; - } -@@ -141,6 +145,11 @@ BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression) - compression - whether to apply RLE or not. - */ - BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) -+{ -+ _gdImageBmpCtx(im, out, compression); -+} -+ -+static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - { - int bitmap_size = 0, info_size, total_size, padding; - int i, row, xpos, pixel; -@@ -148,6 +157,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - unsigned char *uncompressed_row = NULL, *uncompressed_row_start = NULL; - FILE *tmpfile_for_compression = NULL; - gdIOCtxPtr out_original = NULL; -+ int ret = 1; - - /* No compression if its true colour or we don't support seek */ - if (im->trueColor) { -@@ -325,6 +335,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - out_original = NULL; - } - -+ ret = 0; - cleanup: - if (tmpfile_for_compression) { - #ifdef _WIN32 -@@ -338,7 +349,7 @@ cleanup: - if (out_original) { - out_original->gd_free(out_original); - } -- return; -+ return ret; - } - - static int compress_row(unsigned char *row, int length) --- -2.20.1 -
package/gd/0002-Fix-420-Potential-infinite-loop-in-gdImageCreateFrom.patch deleted +0 -61
61 lines not on this page · raw message
package/gd/0003-Fix-501-Uninitialized-read-in-gdImageCreateFromXbm-C.patch deleted +0 -41
41 lines not on this page · raw message
package/gd/0004-Fix-492-Potential-double-free-in-gdImage-Ptr.patch deleted +0 -219
219 lines not on this page · raw message
package/gd/0005-Fix-potential-NULL-pointer-dereference-in-gdImageClone.patch deleted +0 -44
44 lines not on this page · raw message
package/gd/0006-Fix-497-gdImageColorMatch-Out-Of-Bounds-Write-on-Heap-CVE-2019-6977.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 2e886046f86d0d6bfc14aab94a881259a081e3f4 Mon Sep 17 00:00:00 2001 -From: wilson chen <[email protected]> -Date: Fri, 20 Dec 2019 10:12:04 +0800 -Subject: [PATCH] Fix #497: gdImageColorMatch Out Of Bounds Write on Heap - (CVE-2019-6977) - -Fixed CVE-2019-6977 and add corresponding testcase. - -Original patch by Christoph M. Bechker <[email protected]> -https://gist.github.com/cmb69/1f36d285eb297ed326f5c821d7aafced - -[Retrieved (and updated to remove .gitignore and tests) from: -https://github.com/libgd/libgd/commit/2e886046f86d0d6bfc14aab94a881259a081e3f4] -Signed-off-by: Fabrice Fontaine <[email protected]> ---- - src/gd_color_match.c | 5 ++--- - tests/gdimagecolormatch/.gitignore | 1 + - tests/gdimagecolormatch/CMakeLists.txt | 1 + - tests/gdimagecolormatch/Makemodule.am | 1 + - tests/gdimagecolormatch/cve_2019_6977.c | 25 +++++++++++++++++++++++++ - 5 files changed, 30 insertions(+), 3 deletions(-) - create mode 100644 tests/gdimagecolormatch/cve_2019_6977.c - -diff --git a/src/gd_color_match.c b/src/gd_color_match.c -index f0842b69..f0194302 100644 ---- a/src/gd_color_match.c -+++ b/src/gd_color_match.c -@@ -31,9 +31,8 @@ BGD_DECLARE(int) gdImageColorMatch (gdImagePtr im1, gdImagePtr im2) - return -4; /* At least 1 color must be allocated */ - } - -- buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * im2->colorsTotal); -- memset (buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal ); -- -+ buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * gdMaxColors); -+ memset (buf, 0, sizeof(unsigned long) * 5 * gdMaxColors ); - for (x=0; x < im1->sx; x++) { - for( y=0; y<im1->sy; y++ ) { - color = im2->pixels[y][x];
package/gd/gd.hash +2 -2
@@ -1,3 +1,3 @@ # Locally calculated -sha256 8c302ccbf467faec732f0741a859eef4ecae22fea2d2ab87467be940842bde51 libgd-2.2.5.tar.xz -sha256 d02dae2141d49b8a6b09b2b73e68a8f17d7bbeaaf02b3b841ee11fea2d9e328d COPYING +sha256 ecd9155b9a417fb3f837f29e5966323796de247789163761dd72dbf83bfcac58 libgd-2.3.0.tar.xz +sha256 4d80b4af6c38d7a65128c881623dee2a5daee6b3a6ccab74a5cdfa0dfda96da7 COPYING
package/gd/gd.mk +2 -17
@@ -4,29 +4,15 @@ # ################################################################################ -GD_VERSION = 2.2.5 +GD_VERSION = 2.3.0 GD_SOURCE = libgd-$(GD_VERSION).tar.xz GD_SITE = https://github.com/libgd/libgd/releases/download/gd-$(GD_VERSION) GD_INSTALL_STAGING = YES GD_LICENSE = GD license GD_LICENSE_FILES = COPYING -GD_CONFIG_SCRIPTS = gdlib-config GD_CONF_OPTS = --without-x --disable-rpath --disable-werror GD_DEPENDENCIES = host-pkgconf -# 0001-bmp-check-return-value-in-gdImageBmpPtr.patch -GD_IGNORE_CVES += CVE-2018-1000222 -# 0002-Fix-420-Potential-infinite-loop-in-gdImageCreateFrom.patch -GD_IGNORE_CVES += CVE-2018-5711 -# 0003-Fix-501-Uninitialized-read-in-gdImageCreateFromXbm-C.patch -GD_IGNORE_CVES += CVE-2019-11038 -# 0004-Fix-492-Potential-double-free-in-gdImage-Ptr.patch -GD_IGNORE_CVES += CVE-2019-6978 -# 0005-Fix-potential-NULL-pointer-dereference-in-gdImageClone.patch -GD_IGNORE_CVES += CVE-2018-14553 -# 0006-Fix-497-gdImageColorMatch-Out-Of-Bounds-Write-on-Heap-CVE-2019-6977.patch -GD_IGNORE_CVES += CVE-2019-6977 - # gd forgets to link utilities with -pthread even though it uses # pthreads, causing linking errors with static linking ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
@@ -47,8 +33,7 @@ endif ifeq ($(BR2_PACKAGE_LIBICONV),y) GD_DEPENDENCIES += libiconv -# not strictly needed for gd, but ensures -liconv ends up in -# gdlib-config --libs output +# not strictly needed for gd, but ensures -liconv ends up in gdlib.pc GD_CONF_ENV += LIBS="-liconv" endif
Signature · 1 line
2.29.2