diff --git a/graphics/gd/Makefile b/graphics/gd/Makefile index aa32799705d3..87ba50d8e873 100644 --- a/graphics/gd/Makefile +++ b/graphics/gd/Makefile @@ -7,7 +7,7 @@ PORTNAME= gd PORTVERSION= 2.0.35 -PORTREVISION?= 1 +PORTREVISION?= 2 PORTEPOCH= 1 CATEGORIES+= graphics MASTER_SITES= http://www.libgd.org/releases/ diff --git a/graphics/gd/files/patch-cve-2009-3546 b/graphics/gd/files/patch-cve-2009-3546 new file mode 100644 index 000000000000..f483039105b8 --- /dev/null +++ b/graphics/gd/files/patch-cve-2009-3546 @@ -0,0 +1,15 @@ +Adopted-From: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_2/ext/gd/libgd/gd_gd.c?r1=289557&r2=289556&pathrev=289557&view=patch + +--- gd_gd.c.orig 2006-04-05 19:52:22.000000000 +0400 ++++ gd_gd.c 2009-11-06 18:06:50.000000000 +0300 +@@ -44,6 +44,10 @@ + { + goto fail1; + } ++ if (im->colorsTotal > gdMaxColors) ++ { ++ goto fail1; ++ } + } + /* Int to accommodate truecolor single-color transparency */ + if (!gdGetInt (&im->transparent, in))