cvs: gd(GD_2_0) /libgd NEWS gd.c /libgd/tests CMakeLists.txt /libgd/tests/gdimagecolortransparent CMakeLists.txt gdimagecolortransparent.c
[email protected] ("Mattias Bengtsson") Sun, 09 Sep 2007 13:12:39 -0000
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvsmattias1189343559@cvsserver> |
mattias Sun Sep 9 13:12:39 2007 UTC
Added files: (Branch: GD_2_0)
/gd/libgd/tests/gdimagecolortransparent CMakeLists.txt
gdimagecolortransparent.c
Modified files:
/gd/libgd NEWS gd.c
/gd/libgd/tests CMakeLists.txt
Log:
- #113, gdImageColorTransparent can write outside buffer
http://cvs.php.net/viewvc.cgi/gd/libgd/NEWS?r1=1.4.2.32&r2=1.4.2.33&diff_format=u
Index: gd/libgd/NEWS
diff -u gd/libgd/NEWS:1.4.2.32 gd/libgd/NEWS:1.4.2.33
--- gd/libgd/NEWS:1.4.2.32 Fri Aug 31 07:31:03 2007
+++ gd/libgd/NEWS Sun Sep 9 13:12:39 2007
@@ -9,6 +9,7 @@
109, Possible integer overflow in gdImageFill() (Mattias Bengtsson)
111, Optimization for single pixel line not in correct order (Mattias)
112, gdImageColorDeallocate can write outside buffer (Mattias Bengtsson)
+113, gdImageColorTransparent can write outside buffer (Mattias Bengtsson)
GD 2.0.35 (2007-06-21)
41, Fix valgrind error in gdImageFillTiled (Nuno Lopes)
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49.2.22&r2=1.49.2.23&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.49.2.22 gd/libgd/gd.c:1.49.2.23
--- gd/libgd/gd.c:1.49.2.22 Sat Sep 1 12:34:59 2007
+++ gd/libgd/gd.c Sun Sep 9 13:12:39 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.49.2.22 2007/09/01 12:34:59 mattias Exp $ */
+/* $Id: gd.c,v 1.49.2.23 2007/09/09 13:12:39 mattias Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -601,6 +601,9 @@
{
if (!im->trueColor)
{
+ if((color < -1) || (color >= gdMaxColors)) {
+ return;
+ }
if (im->transparent != -1)
{
im->alpha[im->transparent] = gdAlphaOpaque;
http://cvs.php.net/viewvc.cgi/gd/libgd/tests/CMakeLists.txt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: gd/libgd/tests/CMakeLists.txt
diff -u gd/libgd/tests/CMakeLists.txt:1.1.2.2 gd/libgd/tests/CMakeLists.txt:1.1.2.3
--- gd/libgd/tests/CMakeLists.txt:1.1.2.2 Fri Aug 31 07:31:03 2007
+++ gd/libgd/tests/CMakeLists.txt Sun Sep 9 13:12:39 2007
@@ -33,6 +33,7 @@
gdimagecolorexact
gdimagecolorresolve
gdimagecolordeallocate
+ gdimagecolortransparent
#gdimageellipse
gdimageline
gdimagefilledellipse
http://cvs.php.net/viewvc.cgi/gd/libgd/tests/gdimagecolortransparent/CMakeLists.txt?view=markup&rev=1.1
Index: gd/libgd/tests/gdimagecolortransparent/CMakeLists.txt
+++ gd/libgd/tests/gdimagecolortransparent/CMakeLists.txt
http://cvs.php.net/viewvc.cgi/gd/libgd/tests/gdimagecolortransparent/gdimagecolortransparent.c?view=markup&rev=1.1
Index: gd/libgd/tests/gdimagecolortransparent/gdimagecolortransparent.c
+++ gd/libgd/tests/gdimagecolortransparent/gdimagecolortransparent.c