From: Cristy Date: Thu, 12 May 2016 11:14:46 +0000 (-0400) Subject: Make check sooner for maximum image extent X-Git-Tag: 7.0.1-4~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=280ab73c22d1c1084ad88188399899a01960bdb7;p=imagemagick Make check sooner for maximum image extent --- diff --git a/coders/xcf.c b/coders/xcf.c index 6ff8e8a23..4c708a0d8 100644 --- a/coders/xcf.c +++ b/coders/xcf.c @@ -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 */