1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00

- - Fixed #51128, imagefill() doesn't work with large images

This commit is contained in:
Pierre Joye
2010-04-28 14:35:42 +00:00
parent 17f5a9d2a2
commit 0688e6ef01
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@@ -86,6 +86,7 @@ PHP NEWS
(Felipe)
- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when
an invalid option is provided). (Ilia)
- Fixed bug #51128 (imagefill() doesn't work with large images). (Pierre)
- Fixed bug #51096 ('last day' and 'first day' are handled incorrectly when
parsing date strings). (Derick)
- Fixed bug #51086 (DBA DB4 doesn't work with Berkeley DB 4.8). (Chris Jones)

View File

@@ -1845,9 +1845,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
struct seg {int y, xl, xr, dy;};
/* max depth of stack */
#define FILL_MAX 1200000
#define FILL_MAX ((int)(im->sy*im->sx)/4)
#define FILL_PUSH(Y, XL, XR, DY) \
if (sp<stack+FILL_MAX*10 && Y+(DY)>=0 && Y+(DY)<wy2) \
if (sp<stack+FILL_MAX && Y+(DY)>=0 && Y+(DY)<wy2) \
{sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;}
#define FILL_POP(Y, XL, XR, DY) \