aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2009-02-04 14:42:35 +0800
committerale <ale@FreeBSD.org>2009-02-04 14:42:35 +0800
commitb6ea4dc51d2cbf53cdb2b19c87a8206d53c1e7c9 (patch)
tree213e06ace66f9f1eaa361ed175e4f87764071c98
parenta0b925a80c271da7f1aa94a821d2df8101bb5d0e (diff)
downloadfreebsd-ports-graphics-b6ea4dc51d2cbf53cdb2b19c87a8206d53c1e7c9.tar.gz
freebsd-ports-graphics-b6ea4dc51d2cbf53cdb2b19c87a8206d53c1e7c9.tar.zst
freebsd-ports-graphics-b6ea4dc51d2cbf53cdb2b19c87a8206d53c1e7c9.zip
Fix security bug.
-rw-r--r--graphics/php5-gd/Makefile1
-rw-r--r--graphics/php5-gd/files/patch-libgd_gd.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/graphics/php5-gd/Makefile b/graphics/php5-gd/Makefile
index 6ed41946bb2..226c563415a 100644
--- a/graphics/php5-gd/Makefile
+++ b/graphics/php5-gd/Makefile
@@ -5,6 +5,7 @@
# $FreeBSD$
#
+PORTREVISION= 1
CATEGORIES= graphics
MASTERDIR= ${.CURDIR}/../../lang/php5
diff --git a/graphics/php5-gd/files/patch-libgd_gd.c b/graphics/php5-gd/files/patch-libgd_gd.c
new file mode 100644
index 00000000000..8060b717ef5
--- /dev/null
+++ b/graphics/php5-gd/files/patch-libgd_gd.c
@@ -0,0 +1,11 @@
+--- libgd/gd.c.orig 2009-01-05 14:54:19.000000000 +0100
++++ libgd/gd.c 2009-01-05 14:54:53.000000000 +0100
+@@ -3136,7 +3136,7 @@
+ return NULL;
+ }
+
+- if (!gdImageTrueColor(src) && clrBack>=gdImageColorsTotal(src)) {
++ if (!gdImageTrueColor(src) && (clrBack < 0 || clrBack>=gdImageColorsTotal(src))) {
+ return NULL;
+ }
+