Skip to content

Commit f6ffc70

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/1588
1 parent 68192c0 commit f6ffc70

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Diff for: magick/annotate.c

+3
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
266266
{
267267
annotate_info=DestroyDrawInfo(annotate_info);
268268
annotate=DestroyDrawInfo(annotate);
269+
text=DestroyString(text);
269270
return(MagickFalse);
270271
}
271272
p=text;
@@ -300,6 +301,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
300301
annotate_info=DestroyDrawInfo(annotate_info);
301302
annotate=DestroyDrawInfo(annotate);
302303
textlist=(char **) RelinquishMagickMemory(textlist);
304+
text=DestroyString(text);
303305
return(MagickFalse);
304306
}
305307
if (IsGrayColorspace(image->colorspace) != MagickFalse)
@@ -517,6 +519,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
517519
annotate_info=DestroyDrawInfo(annotate_info);
518520
annotate=DestroyDrawInfo(annotate);
519521
textlist=(char **) RelinquishMagickMemory(textlist);
522+
text=DestroyString(text);
520523
return(status);
521524
}
522525

Diff for: magick/fourier.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,14 @@ MagickExport Image *ComplexImages(const Image *images,const ComplexOperator op,
245245

246246
if (status == MagickFalse)
247247
continue;
248-
Ar=GetCacheViewVirtualPixels(Ar_view,0,y,Ar_image->columns,1,exception);
249-
Ai=GetCacheViewVirtualPixels(Ai_view,0,y,Ai_image->columns,1,exception);
250-
Br=GetCacheViewVirtualPixels(Br_view,0,y,Br_image->columns,1,exception);
251-
Bi=GetCacheViewVirtualPixels(Bi_view,0,y,Bi_image->columns,1,exception);
248+
Ar=GetCacheViewVirtualPixels(Ar_view,0,y,
249+
MagickMax(Ar_image->columns,Cr_image->columns),1,exception);
250+
Ai=GetCacheViewVirtualPixels(Ai_view,0,y,
251+
MagickMax(Ai_image->columns,Ci_image->columns),1,exception);
252+
Br=GetCacheViewVirtualPixels(Br_view,0,y,
253+
MagickMax(Br_image->columns,Cr_image->columns),1,exception);
254+
Bi=GetCacheViewVirtualPixels(Bi_view,0,y,
255+
MagickMax(Bi_image->columns,Ci_image->columns),1,exception);
252256
Cr=QueueCacheViewAuthenticPixels(Cr_view,0,y,Cr_image->columns,1,exception);
253257
Ci=QueueCacheViewAuthenticPixels(Ci_view,0,y,Ci_image->columns,1,exception);
254258
if ((Ar == (const PixelPacket *) NULL) ||

0 commit comments

Comments
 (0)