From: Cristy Date: Sun, 1 Jul 2018 11:27:00 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9209 X-Git-Tag: 7.0.8-4~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29a97ee49ac5269ce55f483da7f4345f51aac885;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9209 --- diff --git a/coders/dcm.c b/coders/dcm.c index fa5b99bd6..cd0133278 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3934,6 +3934,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) length=(size_t) (GetQuantumRange(info.depth)+1); if (length > (size_t) GetBlobSize(image)) ThrowDCMException(CorruptImageError,"InsufficientImageDataInFile"); + if (info.scale != (Quantum *) NULL) + info.scale=(Quantum *) RelinquishMagickMemory(info.scale); info.scale=(Quantum *) AcquireQuantumMemory(MagickMax(length,256), sizeof(*info.scale)); if (info.scale == (Quantum *) NULL)