File ImageMagick-CVE-2019-12974.patch of Package ImageMagick.30356
diff --git a/coders/pango.c b/coders/pango.c
index fd9040bc4f..5f9118738f 100644
--- a/coders/pango.c
+++ b/coders/pango.c
@@ -201,8 +201,11 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
else
property=InterpretImageProperties((ImageInfo *) image_info,image,option,
exception);
- (void) SetImageProperty(image,"caption",property,exception);
- property=DestroyString(property);
+ if (property != (char *) NULL)
+ {
+ (void) SetImageProperty(image,"caption",property,exception);
+ property=DestroyString(property);
+ }
caption=ConstantString(GetImageProperty(image,"caption",exception));
/*
Get context.
diff --git a/coders/vid.c b/coders/vid.c
index 5aa4b0941b..dd57930a3f 100644
--- a/coders/vid.c
+++ b/coders/vid.c
@@ -176,8 +176,11 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
break;
label=InterpretImageProperties((ImageInfo *) image_info,next_image,
DefaultTileLabel,exception);
- (void) SetImageProperty(next_image,"label",label,exception);
- label=DestroyString(label);
+ if (label != (char *) NULL)
+ {
+ (void) SetImageProperty(next_image,"label",label,exception);
+ label=DestroyString(label);
+ }
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"geometry: %.20gx%.20g",(double) next_image->columns,(double)