summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch')
-rw-r--r--meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch35
1 files changed, 0 insertions, 35 deletions
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch b/meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch
deleted file mode 100644
index 25b5880ff..000000000
--- a/meta-oe/recipes-support/gd/gd/CVE-2017-6363.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 8f7b60ea7db87de5df76169e3f3918e401ef8bf7 Mon Sep 17 00:00:00 2001
2From: Mike Frysinger <vapier@gentoo.org>
3Date: Wed, 31 Jan 2018 14:50:16 -0500
4Subject: [PATCH] gd/gd2: make sure transparent palette index is within bounds
5 #383
6
7The gd image formats allow for a palette of 256 colors,
8so if the transparent index is out of range, disable it.
9
10Upstream-Status: Backport
11[https://github.com/libgd/libgd.git commit:0be86e1926939a98afbd2f3a23c673dfc4df2a7c]
12CVE-2017-6363
13
14Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
15---
16 src/gd_gd.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/src/gd_gd.c b/src/gd_gd.c
20index f8d39cb..5a86fc3 100644
21--- a/src/gd_gd.c
22+++ b/src/gd_gd.c
23@@ -54,7 +54,8 @@ _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag)
24 if (!gdGetWord (&im->transparent, in)) {
25 goto fail1;
26 }
27- if (im->transparent == 257) {
28+ /* Make sure transparent index is within bounds of the palette. */
29+ if (im->transparent >= 256 || im->transparent < 0) {
30 im->transparent = (-1);
31 }
32 }
33--
341.9.1
35