From ed110711af19afa135bbb0fb07e4a454d2c412b0 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 23 Mar 2010 01:16:38 +0000 Subject: [PATCH] --- ChangeLog | 2 ++ magick/draw.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd95f2338..14eb653b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * Windows does not support complex.h (reference http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=15808). * Add support for monochrome PSD images. + * VignetteImage() no longer crashes when x and y arguments are both greater + than half the width (x) and height (y) of the image. 2010-03-20 6.6.0-8 Glenn Randers-Pehrson * Eliminated some of the deprecated direct references to members of diff --git a/magick/draw.c b/magick/draw.c index d39ccf69a..4da7c172d 100644 --- a/magick/draw.c +++ b/magick/draw.c @@ -1766,7 +1766,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info) /* Allocate primitive info memory. */ - graphic_context=(DrawInfo **) AcquireAlignedMemory(1,sizeof(*graphic_context)); + graphic_context=(DrawInfo **) AcquireAlignedMemory(1, + sizeof(*graphic_context)); if (graphic_context == (DrawInfo **) NULL) { primitive=DestroyString(primitive); @@ -5144,7 +5145,7 @@ static void TraceEllipse(PrimitiveInfo *primitive_info,const PointInfo start, } delta=2.0/MagickMax(stop.x,stop.y); step=(MagickRealType) (MagickPI/8.0); - if (delta < (MagickPI/8.0)) + if ((delta >= 0.0) && (delta < (MagickPI/8.0))) step=MagickPI/(4*(MagickPI/delta/2+0.5)); angle.x=DegreesToRadians(degrees.x); y=degrees.y; -- 2.40.0