pajoye          Sat Mar 13 13:28:20 2004 EDT

  Modified files:              
    /php-src/ext/gd/libgd       gd.c 
  Log:
  - fix #27582 (http://bugs.php.net/bug.php?id=27582)
    The problem was that the colors were changed endlessly, blending over
    and over. An endless loop and recursive calls filled the stack=>segfault
  
  
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.71&r2=1.72&ty=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.71 php-src/ext/gd/libgd/gd.c:1.72
--- php-src/ext/gd/libgd/gd.c:1.71      Tue Mar  2 16:56:30 2004
+++ php-src/ext/gd/libgd/gd.c   Sat Mar 13 13:28:19 2004
@@ -1760,13 +1760,18 @@
        int lastBorder;
        /* Seek left */
        int leftLimit = -1, rightLimit;
-       int i;
+       int i, restoreAlphaBleding=0;
 
        if (border < 0) {
                /* Refuse to fill to a non-solid border */
                return;
        }
 
+       if (im->alphaBlendingFlag) {
+               restoreAlphaBleding = 1;
+               im->alphaBlendingFlag = 0;
+       }
+
        if (x >= im->sx) {
                x = im->sx - 1;
        }
@@ -1809,6 +1814,7 @@
                        }
                }
        }
+
        /* Below */
        if (y < ((im->sy) - 1)) {
                lastBorder = 1;
@@ -1825,8 +1831,11 @@
                        }
                }
        }
-}
+       if (restoreAlphaBleding) {
+               im->alphaBlendingFlag = 1;
+       }
 
+}
 
 /*
  * set the pixel at (x,y) and its 4-connected neighbors

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

Reply via email to