Re: [GD-DEVEL] bug and fix

From: Date: Thu, 19 Jul 2007 05:50:33 +0000
Subject: Re: [GD-DEVEL] bug and fix
References: 1  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-230@lists.php.net to get a copy of this message
Hi Ducky, On 7/19/07, Ducky Sherwood <ducky@webfoot.com> wrote:
Hi -- I found a bug in gdImageFilledPolygon. In some cases, you can get an odd number of x-intercepts, which means that in the call to gdImageLine gdImageLine (im, im->polyInts[i], y, im->polyInts[i + 1], y, fill_color); the im->polyInts[i+1] will be garbage. This can mess up the drawing of the line. I have attached a test case (bug.c) which shows a horizontal line being drawn where it shouldn't. I have also attached a patch, made with diff -Naur gd.c gd.c.good > horizontalLineBug.patch (I would have reported the bug and patch on flypaper, but I never saw a reply (and yes, I told it my correct email address, and no, I couldn't find it in my spam folder).)
Thanks for the patch, I will check it over the weekend. I also created your account manually (see my prv mail), if you like to add it in bugs.libgd.org. Cheers, --Pierre

« previous php.gd.devel (#230) next »