pajoye Thu Jun 14 19:17:31 2007 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/gd/libgd gd.c Log: - Fixed regression introduced by the fix for the libgd bug #74 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.779&r2=1.2027.2.547.2.780&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.779 php-src/NEWS:1.2027.2.547.2.780 --- php-src/NEWS:1.2027.2.547.2.779 Thu Jun 14 07:09:30 2007 +++ php-src/NEWS Thu Jun 14 19:17:30 2007 @@ -15,6 +15,7 @@ - Added missing format validator to unpack() function. (Ilia) - Added missing error check inside bcpowmod(). (Ilia) +- Fixed regression introduced by the fix for the libgd bug #74 (Pierre) - Fixed several integer overflows in ImageCreate(), ImageCreateTrueColor(), ImageCopyResampled() and ImageFilledPolygon() reported by Mattias Bengtsson. (Tony) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.90.2.1.2.12&r2=1.90.2.1.2.13&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.90.2.1.2.12 php-src/ext/gd/libgd/gd.c:1.90.2.1.2.13 --- php-src/ext/gd/libgd/gd.c:1.90.2.1.2.12 Wed Jun 6 09:45:43 2007 +++ php-src/ext/gd/libgd/gd.c Thu Jun 14 19:17:31 2007 @@ -1667,21 +1667,30 @@ int lx = 0, ly = 0; int fx = 0, fy = 0; - if (s > 360) { - s = s % 360; - } - if (e > 360) { - e = e % 360; - } + if ((s % 360) == (e % 360)) { + s = 0; e = 360; + } else { + if (s > 360) { + s = s % 360; + } - while (s<0) { - s += 360; - } + if (e > 360) { + e = e % 360; + } - while (e < s) { - e += 360; - } + while (s < 0) { + s += 360; + } + + while (e < s) { + e += 360; + } + + if (s == e) { + s = 0; e = 360; + } + } for (i = s; i <= e; i++) { int x, y; @@ -2531,6 +2540,7 @@ { int x, y; double sy1, sy2, sx1, sx2; + if (!dst->trueColor) { gdImageCopyResized (dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH); return;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php