File ImageMagick-CVE-2018-5357.patch of Package ImageMagick.8212

Index: ImageMagick-6.8.8-1/coders/dcm.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/dcm.c	2018-02-08 13:53:02.248457081 +0100
+++ ImageMagick-6.8.8-1/coders/dcm.c	2018-02-08 13:54:01.793433451 +0100
@@ -3630,6 +3630,10 @@ static Image *ReadDCMImage(const ImageIn
           }
         (void) RelinquishUniqueFileResource(filename);
       }
+      if (stream_info->offsets != (ssize_t *) NULL)
+        stream_info->offsets=(ssize_t *)
+          RelinquishMagickMemory(stream_info->offsets);
+      stream_info=(DCMStreamInfo *) RelinquishMagickMemory(stream_info);
       read_info=DestroyImageInfo(read_info);
       image=DestroyImage(image);
       return(GetFirstImageInList(images));