pajoye                                   Thu, 03 Sep 2009 09:45:56 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=287979

Log:
- Fix sanity check for the color index in imagecolortransparent

Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    U   php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
    U   php/php-src/trunk/ext/gd/libgd/gd.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-03 08:48:28 UTC (rev 287978)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-03 09:45:56 UTC (rev 287979)
@@ -3,6 +3,7 @@
 ?? ??? 2009, PHP 5.2.11
 - Added missing sanity checks around exif processing (Ilia)

+- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
 - Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
 - Fixed leak on error in popen/exec (and related functions on Windows. (Pierre)


Modified: php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c      2009-09-03 08:48:28 UTC 
(rev 287978)
+++ php/php-src/branches/PHP_5_2/ext/gd/libgd/gd.c      2009-09-03 09:45:56 UTC 
(rev 287979)
@@ -591,7 +591,7 @@
                if (im->transparent != -1) {
                        im->alpha[im->transparent] = gdAlphaOpaque;
                }
-               if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
+               if (color > -1 && color < im->colorsTotal && color < 
gdMaxColors) {
                        im->alpha[color] = gdAlphaTransparent;
                } else {
                        return;

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2009-09-03 08:48:28 UTC (rev 287978)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-09-03 09:45:56 UTC (rev 287979)
@@ -16,6 +16,7 @@
 - Improved shared extension loading on OSX to use the standard Unix dlopen()
   API. (Scott)

+- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
 - Fixed scandir/readdir when used mounted points on Windows. (Pierre)
 - Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
 - Fixed leak on error in popen/exec (and related functions) on Windows.

Modified: php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c      2009-09-03 08:48:28 UTC 
(rev 287978)
+++ php/php-src/branches/PHP_5_3/ext/gd/libgd/gd.c      2009-09-03 09:45:56 UTC 
(rev 287979)
@@ -595,7 +595,7 @@
                if (im->transparent != -1) {
                        im->alpha[im->transparent] = gdAlphaOpaque;
                }
-               if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
+               if (color > -1 && color < im->colorsTotal && color < 
gdMaxColors) {
                        im->alpha[color] = gdAlphaTransparent;
                } else {
                        return;

Modified: php/php-src/trunk/ext/gd/libgd/gd.c
===================================================================
--- php/php-src/trunk/ext/gd/libgd/gd.c 2009-09-03 08:48:28 UTC (rev 287978)
+++ php/php-src/trunk/ext/gd/libgd/gd.c 2009-09-03 09:45:56 UTC (rev 287979)
@@ -595,7 +595,7 @@
                if (im->transparent != -1) {
                        im->alpha[im->transparent] = gdAlphaOpaque;
                }
-               if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
+               if (color > -1 && color < im->colorsTotal && color < 
gdMaxColors) {
                        im->alpha[color] = gdAlphaTransparent;
                } else {
                        return;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to