summaryrefslogtreecommitdiff
path: root/graphics/php4-gd/files
diff options
context:
space:
mode:
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)) {