From: Dirk Lemstra Date: Thu, 20 Jul 2017 20:26:48 +0000 (+0200) Subject: Exit early when identifying the image. X-Git-Tag: 7.0.6-2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9be91b96c6eeb9a104dd9b90ecc47ccd9cb42de3;p=imagemagick Exit early when identifying the image. --- diff --git a/coders/dng.c b/coders/dng.c index e9f0ef3aa..1e1267817 100644 --- a/coders/dng.c +++ b/coders/dng.c @@ -258,6 +258,12 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception) libraw_close(raw_info); return(DestroyImageList(image)); } + if (image_info->ping != MagickFalse) + { + libraw_dcraw_clear_mem(raw_image); + libraw_close(raw_info); + return(image); + } p=(unsigned short *) raw_image->data; for (y=0; y < (ssize_t) image->rows; y++) {