blob: 7713377776dc75304e93a928230a3d10e36f70ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$NetBSD: patch-ay,v 1.2 2009/11/30 06:14:08 taca Exp $
* Fix for http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3546
http://svn.php.net/viewvc?view=revision&revision=289557
--- ext/gd/libgd/gd_gd.c.orig 2007-08-09 23:21:38.000000000 +0900
+++ ext/gd/libgd/gd_gd.c
@@ -39,6 +39,9 @@ int _gdGetColors (gdIOCtx * in, gdImageP
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)) {
|