From 8f7ac75f47f493478717915ed8976d00dc8d9e97 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 8 Feb 2018 20:42:37 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/955 --- coders/mpc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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", -- 2.40.0