File ImageMagick-CVE-2018-14435.patch of Package ImageMagick.24648

diff --git a/coders/pcd.c b/coders/pcd.c
index 42941a937c..4bd8ace492 100644
--- a/coders/pcd.c
+++ b/coders/pcd.c
@@ -283,6 +283,9 @@ static MagickBooleanType DecodeImage(Image *image,unsigned char *luma,
           }
           default:
           {
+            for (i=0; i < (image->columns > 1536 ? 3 : 1); i++)
+              pcd_table[i]=(PCDTable *) RelinquishMagickMemory(pcd_table[i]);
+            buffer=(unsigned char *) RelinquishMagickMemory(buffer);
             ThrowBinaryException(CorruptImageError,"CorruptImage",
               image->filename);
           }

openSUSE Build Service is sponsored by