summaryrefslogtreecommitdiff
path: root/graphics/php4-gd/files
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2010-06-14 14:43:44 +0000
committerAlex Dupre <ale@FreeBSD.org>2010-06-14 14:43:44 +0000
commit542b78d08dd94e73ca79a197e8f102cb610b87a7 (patch)
tree889d1905aa889796e4fed3a3ecb8678bdf447632 /graphics/php4-gd/files
parent- Adopt unmaintained ports. (diff)
Security fix for gd remote buffer overflow vulnerability.
PR: ports/147163 Submitted by: Michael Ranner <michael@ranner.eu>
Diffstat (limited to 'graphics/php4-gd/files')
-rw-r--r--graphics/php4-gd/files/patch-libgd_gd_gd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/graphics/php4-gd/files/patch-libgd_gd_gd.c b/graphics/php4-gd/files/patch-libgd_gd_gd.c
new file mode 100644
index 000000000000..121a02498fe0
--- /dev/null
+++ b/graphics/php4-gd/files/patch-libgd_gd_gd.c
@@ -0,0 +1,12 @@
+--- libgd/gd_gd.c.orig 2010-03-26 14:26:22.000000000 +0100
++++ libgd/gd_gd.c 2010-03-26 14:28:03.000000000 +0100
+@@ -40,6 +40,9 @@
+ if (!gdGetWord(&im->colorsTotal, in)) {
+ goto fail1;
+ }
++ if (im->colorsTotal > gdMaxColors) {
++ goto fail1;
++ }
+ }
+ /* Int to accommodate truecolor single-color transparency */
+ if (!gdGetInt(&im->transparent, in)) {