File ImageMagick-CVE-2014-8562.patch of Package ImageMagick.8212

http://trac.imagemagick.org/changeset/16795
Index: coders/dcm.c
===================================================================
--- coders/dcm.c.orig	2013-12-22 03:08:38.000000000 +0100
+++ coders/dcm.c	2014-11-04 11:56:15.007340153 +0100
@@ -2613,7 +2613,7 @@
     { 0xfffe, 0xe000, "!!", "Item" },
     { 0xfffe, 0xe00d, "!!", "Item Delimitation Item" },
     { 0xfffe, 0xe0dd, "!!", "Sequence Delimitation Item" },
-    { 0xffff, 0xffff, "xs", "" }
+    { 0xffff, 0xffff, "xs", (char *) NULL }
   };
 
 
@@ -3432,6 +3432,8 @@
           if ((group == (ssize_t) dicom_info[i].group) &&
               (element == (ssize_t) dicom_info[i].element))
             break;
+        if (dicom_info[i].description != (char *) NULL) 
+        {
         attribute=AcquireString("dcm:");
         (void) ConcatenateString(&attribute,dicom_info[i].description);
         for (i=0; i < (ssize_t) MagickMax(length,4); i++)
@@ -3443,6 +3445,7 @@
             (void) SetImageProperty(image,attribute,(char *) data);
           }
         attribute=DestroyString(attribute);
+        }
       }
     if (image_info->verbose != MagickFalse)
       {