From a4a6230fe074791f82f8c6a36413118bedf7f772 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 7 Feb 2018 16:28:22 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6071 --- coders/dcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coders/dcm.c b/coders/dcm.c index 618979850..8885e1dd2 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3887,6 +3887,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) Compute pixel scaling table. */ length=(size_t) (GetQuantumRange(info.depth)+1); + if (length > GetBlobSize(image)) + ThrowDCMException(CorruptImageError,"InsufficientImageDataInFile"); info.scale=(Quantum *) AcquireQuantumMemory(length,sizeof(*info.scale)); if (info.scale == (Quantum *) NULL) ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed"); -- 2.40.0