From 17a1a6f97fd088a71931bdc422f4e96bb6ffc549 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 19 Aug 2018 08:09:05 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1249 --- coders/psd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/psd.c b/coders/psd.c index 41456cd12..2dff0ce3e 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -790,7 +790,7 @@ static StringInfo *ParseImageResourceBlocks(Image *image, if (p > (blocks+length-4)) break; p=PushLongPixel(MSBEndian,p,&count); - if ((p+count) > (blocks+length)) + if (((p+count) < blocks) || ((p+count) > (blocks+length))) break; switch (id) { -- 2.40.0