mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- - Fixed #51128, imagefill() doesn't work with large images
This commit is contained in:
parent
68e0e88610
commit
ef76df031b
1 changed files with 2 additions and 2 deletions
|
@ -1845,9 +1845,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
|
||||||
struct seg {int y, xl, xr, dy;};
|
struct seg {int y, xl, xr, dy;};
|
||||||
|
|
||||||
/* max depth of stack */
|
/* max depth of stack */
|
||||||
#define FILL_MAX 1200000
|
#define FILL_MAX ((int)(im->sy*im->sx)/4)
|
||||||
#define FILL_PUSH(Y, XL, XR, DY) \
|
#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++;}
|
{sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;}
|
||||||
|
|
||||||
#define FILL_POP(Y, XL, XR, DY) \
|
#define FILL_POP(Y, XL, XR, DY) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue