]> granicus.if.org Git - php/commitdiff
- Fix sanity check for the color index in imagecolortransparent
authorPierre Joye <pajoye@php.net>
Thu, 3 Sep 2009 09:45:56 +0000 (09:45 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 3 Sep 2009 09:45:56 +0000 (09:45 +0000)
ext/gd/libgd/gd.c

index 05def991b6436e9c907e5594d8e317554c8ef901..d76cf3fb93919630ac01ae424e5159c0d7c0e620 100644 (file)
@@ -595,7 +595,7 @@ void gdImageColorTransparent (gdImagePtr im, int color)
                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;