]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/955
authorCristy <urban-warrior@imagemagick.org>
Fri, 9 Feb 2018 01:42:37 +0000 (20:42 -0500)
committerCristy <urban-warrior@imagemagick.org>
Fri, 9 Feb 2018 01:42:37 +0000 (20:42 -0500)
coders/mpc.c

index fe6506bec8cc8129529c6b72eb16a7369250595e..83525dd9b9ab8f8c38ee4f2017643e4078fee450 100644 (file)
@@ -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",