- 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)
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;
{
int x, y;
double sy1, sy2, sx1, sx2;
+
if (!dst->trueColor) {
gdImageCopyResized (dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH);
return;