From: Cristy Date: Wed, 7 Mar 2018 00:58:47 +0000 (-0500) Subject: https://oss-fuzz.com/v2/testcase-detail/5137698625945600?noredirect=1 X-Git-Tag: 7.0.7-26~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f52c1fb9ccb0f674aaeaac7df15b1b69465cd7e;p=imagemagick https://oss-fuzz.com/v2/testcase-detail/5137698625945600?noredirect=1 --- diff --git a/MagickCore/distort.c b/MagickCore/distort.c index 42ec9c659..3a137af00 100644 --- a/MagickCore/distort.c +++ b/MagickCore/distort.c @@ -2821,7 +2821,7 @@ MagickExport Image *RotateImage(const Image *image,const double degrees, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickCoreSignature); - angle=degrees-360.0*(ssize_t) (degrees/360.0); + angle=degrees-(360.0*floor(degrees/360.0)); while (angle < -45.0) angle+=360.0; for (rotations=0; angle > 45.0; rotations++) diff --git a/MagickCore/shear.c b/MagickCore/shear.c index 4148a7fe1..b6a627081 100644 --- a/MagickCore/shear.c +++ b/MagickCore/shear.c @@ -1742,7 +1742,7 @@ MagickExport Image *ShearRotateImage(const Image *image,const double degrees, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickCoreSignature); - angle=degrees-360.0*(ssize_t) (degrees/360.0); + angle=degrees-(360.0*floor(degrees/360.0)); if (angle < -45.0) angle+=360.0; for (rotations=0; angle > 45.0; rotations++)