From ef76df031bd26ff25de32cabb4703037b29fe4fe Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 28 Apr 2010 14:35:42 +0000 Subject: [PATCH] - - Fixed #51128, imagefill() doesn't work with large images --- ext/gd/libgd/gd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 0510bec14e4..0cc2e1d7de9 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -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=0 && Y+(DY)=0 && Y+(DY)y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;} #define FILL_POP(Y, XL, XR, DY) \