File ImageMagick-CVE-2017-5511.patch of Package ImageMagick.8212

Index: ImageMagick-6.8.8-1/coders/psd.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/psd.c	2017-01-24 14:48:38.103973161 +0100
+++ ImageMagick-6.8.8-1/coders/psd.c	2017-01-24 14:49:10.620440130 +0100
@@ -1396,7 +1396,7 @@ static MagickStatusType ReadPSDLayers(Im
             /*
               Layer name.
             */
-            length=(size_t) ReadBlobByte(image);
+            length=(size_t) (unsigned char)ReadBlobByte(image);
             combined_length+=length+1;
             for (j=0; j < (ssize_t) length; j++)
               layer_info[i].name[j]=(unsigned char) ReadBlobByte(image);