From: Dirk Lemstra Date: Wed, 9 May 2018 20:05:32 +0000 (+0200) Subject: Also check extent from raw_info to avoid excessive allocations. X-Git-Tag: 7.0.7-32~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eda7238dc6977fa1e0be8eabc9be1e8706a2116;p=imagemagick Also check extent from raw_info to avoid excessive allocations. --- diff --git a/coders/dng.c b/coders/dng.c index 9a108d069..03499cb8f 100644 --- a/coders/dng.c +++ b/coders/dng.c @@ -318,6 +318,12 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception) libraw_close(raw_info); return(image); } + status=SetImageExtent(image,image->columns,image->rows,exception); + if (status == MagickFalse) + { + libraw_close(raw_info); + return(image); + } errcode=libraw_unpack(raw_info); if (errcode != LIBRAW_SUCCESS) {