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.3.3RC1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07446082c86ad21833006c2aa86cb6cc60cd25ad;p=php - Fix #51671, imagefill does not work correctly for small images --- diff --git a/NEWS b/NEWS index b7ba382244..95b30a4a6d 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ PHP NEWS - Fixed a NULL pointer dereference when processing invalid XML-RPC requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas) + +- 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 #51647 Certificate file without private key (pk in another file) 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