Skip to content
Permalink
Browse files

Added extra check to fix #93

  • Loading branch information...
dlemstra committed Feb 2, 2016
1 parent 30eec87 commit 4b1b9c0522628887195bad3a6723f7000b0c9a58
Showing with 1 addition and 1 deletion.
  1. +1 −1 coders/psd.c
@@ -1936,7 +1936,7 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (blocks == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
count=ReadBlob(image,(size_t) length,blocks);
if ((count != (ssize_t) length) ||
if ((count != (ssize_t) length) || (length < 4) ||
(LocaleNCompare((char *) blocks,"8BIM",4) != 0))
{
blocks=(unsigned char *) RelinquishMagickMemory(blocks);

0 comments on commit 4b1b9c0

Please sign in to comment.
You can’t perform that action at this time.