From b812ad1de189f62bd86e84d9ca0db26c5b55acec627fcb5731f2941e2d117de0 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 4 Feb 2019 09:23:05 +0000 Subject: [PATCH] * CVE-2019-6977 [bsc#1123361] + php-CVE-2019-6977.patch OBS-URL: https://build.opensuse.org/package/show/graphics/gd?expand=0&rev=52 --- gd-CVE-2019-6977.patch | 15 +++++++++++++++ gd.changes | 2 ++ gd.spec | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 gd-CVE-2019-6977.patch diff --git a/gd-CVE-2019-6977.patch b/gd-CVE-2019-6977.patch new file mode 100644 index 0000000..881ae2c --- /dev/null +++ b/gd-CVE-2019-6977.patch @@ -0,0 +1,15 @@ +Index: libgd-2.2.5/src/gd_color_match.c +=================================================================== +--- libgd-2.2.5.orig/src/gd_color_match.c 2019-01-31 12:56:44.944336318 +0100 ++++ libgd-2.2.5/src/gd_color_match.c 2019-01-31 12:58:11.368836899 +0100 +@@ -31,8 +31,8 @@ BGD_DECLARE(int) gdImageColorMatch (gdIm + 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; ysy; y++ ) { diff --git a/gd.changes b/gd.changes index 6c210f6..a09fe9f 100644 --- a/gd.changes +++ b/gd.changes @@ -4,6 +4,8 @@ Thu Jan 31 11:23:17 UTC 2019 - Petr Gajdos - security update * CVE-2019-6978 [bsc#1123522] + gd-CVE-2019-6978.patch + * CVE-2019-6977 [bsc#1123361] + + php-CVE-2019-6977.patch ------------------------------------------------------------------- Thu Dec 13 16:24:15 UTC 2018 - meissner@suse.com diff --git a/gd.spec b/gd.spec index 5552d17..ed6bd69 100644 --- a/gd.spec +++ b/gd.spec @@ -37,6 +37,7 @@ Patch4: gd-CVE-2018-5711.patch Patch5: libgd-config.patch Patch6: gd-CVE-2018-1000222.patch Patch7: gd-CVE-2019-6978.patch +Patch8: gd-CVE-2019-6977.patch # needed for tests BuildRequires: dejavu BuildRequires: libjpeg-devel @@ -88,6 +89,7 @@ the formats accepted for inline images by most browsers. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 chmod 644 COPYING %build