From 7505482115a172466bed500482d00d4ac8cd5c83 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 13 Jan 2018 09:58:46 -0500 Subject: [PATCH] Return if the image does not have an associated blob --- MagickCore/compress.c | 2 ++ 1 file changed, 2 insertions(+) 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, -- 2.40.0