From: Dirk Lemstra Date: Sun, 29 Jan 2017 17:24:09 +0000 (+0100) Subject: Added check for when SetImageInfo changed the blob to a file. X-Git-Tag: 7.0.4-7~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3ca5db8fea61200e88345b18c136b4a89a2e7a7;p=imagemagick Added check for when SetImageInfo changed the blob to a file. --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index f465ca5e0..1747eae1a 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -4785,15 +4785,13 @@ MagickExport Image *UserBlobToImage(const ImageInfo *image_info, return((Image *) NULL); } image=(Image *) NULL; - if (GetMagickBlobSupport(magick_info) != MagickFalse) + if ((GetMagickBlobSupport(magick_info) != MagickFalse) || + (blob_info->user_info == (UserBlobInfo *) NULL)) { /* - Native blob support for this image format. + Native blob support for this image format or SetImageInfo changed the + blob to a file. */ - (void) CopyMagickString(blob_info->filename,image_info->filename, - MagickPathExtent); - (void) CopyMagickString(blob_info->magick,image_info->magick, - MagickPathExtent); image=ReadImage(blob_info,exception); if (image != (Image *) NULL) (void) CloseBlob(image);