cvs: php-src(PHP_4_3) /ext/gd/libgd gd.c /ext/gd/tests bug28984.phpt
| From: | Pierre-Alain Joye | Date: | Sat, 03 Jul 2004 15:32:33 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/gd/libgd gd.c /ext/gd/tests bug28984.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27746@lists.php.net to get a copy of this message | ||
pajoye Sat Jul 3 11:32:33 2004 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/gd/tests bug28984.phpt
Modified files:
/php-src/ext/gd/libgd gd.c
Log:
- Fix #28984, using full transparent segfauls in imagefill
(NB: imagefill is broken in HEAD, same code)
- Add testcase
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.24.2.32&r2=1.24.2.33&ty=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.24.2.32 php-src/ext/gd/libgd/gd.c:1.24.2.33
--- php-src/ext/gd/libgd/gd.c:1.24.2.32 Mon May 24 16:03:08 2004
+++ php-src/ext/gd/libgd/gd.c Sat Jul 3 11:32:33 2004
@@ -1879,13 +1879,18 @@
int l, x1, x2, dy;
int oc; /* old pixel value */
int wx2,wy2;
+ int alphablending_bak;
/* stack of filled segments */
/* struct seg stack[FILL_MAX],*sp = stack;; */
struct seg *stack;
struct seg *sp;
+ alphablending_bak = im->alphaBlendingFlag;
+ im->alphaBlendingFlag = 0;
+
if (nc==gdTiled){
_gdImageFillTiled(im,x,y,nc);
+ im->alphaBlendingFlag = alphablending_bak;
return;
}
@@ -1931,6 +1936,7 @@
} while (x<=x2);
}
efree(stack);
+ im->alphaBlendingFlag = alphablending_bak;
}
void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)
http://cvs.php.net/co.php/php-src/ext/gd/tests/bug28984.phpt?r=1.1&p=1
Index: php-src/ext/gd/tests/bug28984.phpt
+++ php-src/ext/gd/tests/bug28984.phpt