File ImageMagick-CVE-2019-13301.patch of Package ImageMagick.22732
Index: ImageMagick-7.0.7-34/MagickCore/annotate.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickCore/annotate.c 2018-05-20 17:55:42.000000000 +0200
+++ ImageMagick-7.0.7-34/MagickCore/annotate.c 2019-07-23 15:34:21.288944376 +0200
@@ -334,7 +338,12 @@ MagickExport MagickBooleanType AnnotateI
(void) ParseGeometry(annotate_info->geometry,&geometry_info);
}
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
- return(MagickFalse);
+ {
+ annotate_info=DestroyDrawInfo(annotate_info);
+ annotate=DestroyDrawInfo(annotate);
+ textlist=(char **) RelinquishMagickMemory(textlist);
+ return(MagickFalse);
+ }
if (IsGrayColorspace(image->colorspace) != MagickFalse)
(void) SetImageColorspace(image,sRGBColorspace,exception);
status=MagickTrue;