File ImageMagick-CVE-2016-7535.patch of Package ImageMagick.8212

--- a/coders/psd.c
+++ b/coders/psd.c
@@ -2348,7 +2348,7 @@ static MagickBooleanType WriteImageChannels(const PSDInfo *psd_info,
   compact_pixels=(unsigned char *) NULL;
   if (next_image->compression == RLECompression)
     {
-      compact_pixels=(unsigned char *) AcquireQuantumMemory((2*channels*
+      compact_pixels=(unsigned char *) AcquireQuantumMemory((9*channels*
         next_image->columns)+1,packet_size*sizeof(*compact_pixels));
       if (compact_pixels == (unsigned char *) NULL)
         ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");