From: cristy Date: Sun, 18 May 2014 11:37:46 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2324 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b1868b2feb9cafd1d478dcef80d69f49d8400a5;p=imagemagick --- diff --git a/coders/viff.c b/coders/viff.c index 8ca223dea..7c5855a1a 100644 --- a/coders/viff.c +++ b/coders/viff.c @@ -393,11 +393,13 @@ static Image *ReadVIFFImage(const ImageInfo *image_info, */ if (viff_info.data_storage_type == VFF_TYP_BIT) image->colors=2; - else if (viff_info.data_storage_type == VFF_MAPTYP_1_BYTE) - image->colors=256UL; else - image->colors=image->depth <= 8 ? 256UL : 65536UL; - if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) + if (viff_info.data_storage_type == VFF_MAPTYP_1_BYTE) + image->colors=256UL; + else + image->colors=image->depth <= 8 ? 256UL : 65536UL; + status=AcquireImageColormap(image,image->colors,exception); + if (status == MagickFalse) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); } break;