From: Pierre Joye Date: Wed, 28 Apr 2010 08:23:44 +0000 (+0000) Subject: - Fix #51671, imagefill does not work correctly for small images X-Git-Tag: php-5.4.0alpha1~191^2~1629 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c09a8cb043604996b29965f2c98fbda6d91387a3;p=php - Fix #51671, imagefill does not work correctly for small images --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index b9cde26296..0510bec14e 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1907,7 +1907,7 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) goto done; } gdImageSetPixel(im, ix, iy, nc); - } while(ix++ < (im->sx -1)); + } while(iy++ < (im->sy -1)); goto done; } diff --git a/ext/gd/tests/bug51671.phpt b/ext/gd/tests/bug51671.phpt new file mode 100644 index 0000000000..5dd77fe67b --- /dev/null +++ b/ext/gd/tests/bug51671.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #51671 (imagefill does not work correctly for small images) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +OK