]> granicus.if.org Git - imagemagick/commitdiff
Make check sooner for maximum image extent
authorCristy <urban-warrior@imagemagick.org>
Thu, 12 May 2016 11:14:46 +0000 (07:14 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 12 May 2016 11:14:46 +0000 (07:14 -0400)
coders/xcf.c

index 6ff8e8a232cbdd2ba0c2bb66fbfef00b655ae1cd..4c708a0d8ecfbf32fee262097f588f711cb0262f 100644 (file)
@@ -1059,6 +1059,9 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   doc_info.file_size=GetBlobSize(image);
   image->compression=NoCompression;
   image->depth=8;
+  status=SetImageExtent(image,image->columns,image->rows,exception);
+  if (status == MagickFalse)
+    return(DestroyImageList(image));
   if (image_type == GIMP_RGB)
     SetImageColorspace(image,sRGBColorspace,exception);
   else
@@ -1266,9 +1269,6 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       XCFLayerInfo
         *layer_info;
 
-      status=SetImageExtent(image,image->columns,image->rows,exception);
-      if (status == MagickFalse)
-        return(DestroyImageList(image));
       /* 
         the read pointer
       */