From a3bd44634425bf3ee57b5707c4e99c8f05a6a629 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 20 Sep 2018 08:28:12 -0400 Subject: [PATCH] ... --- MagickCore/draw.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 9fb8a2489..bf062c271 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -6188,9 +6188,6 @@ static MagickBooleanType TraceEllipse(MVGInfo *mvg_info,const PointInfo center, register ssize_t i; - size_t - extent; - /* Ellipses are just short segmented polys. */ @@ -6208,14 +6205,13 @@ static MagickBooleanType TraceEllipse(MVGInfo *mvg_info,const PointInfo center, y+=360.0; angle.y=DegreesToRadians(y); coordinates=ceil((angle.y-angle.x)/step+1.0); - extent=(size_t) coordinates; - if ((double) extent < coordinates) + if (coordinates > (double) SSIZE_MAX) { (void) ThrowMagickException(mvg_info->exception,GetMagickModule(), ResourceLimitError,"MemoryAllocationFailed","`%s'",""); return(MagickFalse); } - if (CheckPrimitiveExtent(mvg_info,extent) == MagickFalse) + if (CheckPrimitiveExtent(mvg_info,(size_t) coordinates) == MagickFalse) return(MagickFalse); primitive_info=(*mvg_info->primitive_info)+mvg_info->offset; for (p=primitive_info; angle.x < angle.y; angle.x+=step) -- 2.40.0