File ImageMagick-CVE-2014-9851.patch of Package ImageMagick.7537
Index: ImageMagick-6.8.9-8/coders/psd.c
===================================================================
--- ImageMagick-6.8.9-8.orig/coders/psd.c 2016-06-15 11:25:23.079579827 +0200
+++ ImageMagick-6.8.9-8/coders/psd.c 2016-06-15 11:28:02.898128451 +0200
@@ -545,6 +545,8 @@ static MagickBooleanType ParseImageResou
p=PushShortPixel(MSBEndian,p,&id);
p=PushShortPixel(MSBEndian,p,&short_sans);
p=PushLongPixel(MSBEndian,p,&count);
+ if (p+count > blocks+length)
+ return MagickFalse;
switch (id)
{
case 0x03ed: