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.2.14RC1~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45c13817beec9b717445d8f7332c9894f26eea03;p=php - Fix #51671, imagefill does not work correctly for small images --- diff --git a/NEWS b/NEWS index 9aeaebcbe8..dbe72b7df6 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ PHP NEWS - Fixed handling of session variable serialization on certain prefix characters. Reported by Stefan Esser (Ilia) +- Fixed bug #51671 (imagefill does not work correctly for small images). + (Pierre) - Fixed bug #51670 (getColumnMeta causes segfault when re-executing query after calling nextRowset). (Pierrick) - Fixed bug #51629 (CURLOPT_FOLLOWLOCATION error message is misleading). diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 9432f52913..f7411e6397 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -2000,7 +2000,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