From: Cristy Date: Sat, 13 Jan 2018 14:58:46 +0000 (-0500) Subject: Return if the image does not have an associated blob X-Git-Tag: 7.0.7-22~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7505482115a172466bed500482d00d4ac8cd5c83;p=imagemagick Return if the image does not have an associated blob --- diff --git a/MagickCore/compress.c b/MagickCore/compress.c index 4ec95a6e5..33160220f 100644 --- a/MagickCore/compress.c +++ b/MagickCore/compress.c @@ -449,6 +449,8 @@ MagickExport MagickBooleanType HuffmanDecodeImage(Image *image, assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); + if (image->blob == (BlobInfo *) NULL) + ThrowBinaryException(BlobError,"UnableToOpenBlob",image->filename); mb_hash=(HuffmanTable **) AcquireQuantumMemory(HashSize,sizeof(*mb_hash)); mw_hash=(HuffmanTable **) AcquireQuantumMemory(HashSize,sizeof(*mw_hash)); scanline=(unsigned char *) AcquireQuantumMemory((size_t) image->columns,