From: Cristy Date: Fri, 9 Feb 2018 01:42:37 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/955 X-Git-Tag: 7.0.7-23~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f7ac75f47f493478717915ed8976d00dc8d9e97;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/955 --- diff --git a/coders/mpc.c b/coders/mpc.c index fe6506bec..83525dd9b 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -660,7 +660,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) profile=DestroyStringInfo(profile); break; } - if (LocaleCompare(keyword,"profile") == 0) + if (LocaleCompare(keyword,"profile") == 0) break; (void) SetImageProperty(image,keyword,options,exception); break; @@ -993,7 +993,10 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) */ status=PersistPixelCache(image,cache_filename,MagickTrue,&offset,exception); if (status == MagickFalse) - ThrowReaderException(CacheError,"UnableToPersistPixelCache"); + { + status=SetImageExtent(image,image->columns,image->rows,exception); + ThrowReaderException(CacheError,"UnableToPersistPixelCache"); + } if (EOFBlob(image) != MagickFalse) { ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",