pajoye          Thu Sep 28 08:48:02 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/gd/tests       imagefill_1.phpt 

  Modified files:              
    /php-src/ext/gd/libgd       gd.c 
  Log:
  - imagefill(), infinite loop with wrong color index
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.1&r2=1.90.2.1.2.2&diff_format=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.1 
php-src/ext/gd/libgd/gd.c:1.90.2.1.2.2
--- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.1      Sun Jul 23 21:41:11 2006
+++ php-src/ext/gd/libgd/gd.c   Thu Sep 28 08:48:02 2006
@@ -1885,6 +1885,10 @@
        struct seg *stack;
        struct seg *sp;
 
+       if (!im->trueColor && nc > (im->colorsTotal -1)) {
+               return;
+       }
+
        alphablending_bak = im->alphaBlendingFlag;      
        im->alphaBlendingFlag = 0;
 

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagefill_1.phpt?view=markup&rev=1.1
Index: php-src/ext/gd/tests/imagefill_1.phpt
+++ php-src/ext/gd/tests/imagefill_1.phpt

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

Reply via email to