From c09a8cb043604996b29965f2c98fbda6d91387a3 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 28 Apr 2010 08:23:44 +0000 Subject: [PATCH] - Fix #51671, imagefill does not work correctly for small images --- ext/gd/libgd/gd.c | 2 +- ext/gd/tests/bug51671.phpt | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ext/gd/tests/bug51671.phpt 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 -- 2.40.0