From 29a97ee49ac5269ce55f483da7f4345f51aac885 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 1 Jul 2018 07:27:00 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9209 --- coders/dcm.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.40.0