From 205d397e64fda4ba328042237ed7ddcfcff85e5c Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 9 Jul 2018 19:43:23 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9314 --- coders/dcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coders/dcm.c b/coders/dcm.c index 817b922b9..9caf75e73 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3973,6 +3973,9 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) stream_info->offset_count=length >> 2; if (stream_info->offset_count != 0) { + if (stream_info->offsets != (ssize_t *) NULL) + stream_info->offsets=(ssize_t *) + RelinquishMagickMemory(stream_info->offsets); stream_info->offsets=(ssize_t *) AcquireQuantumMemory( stream_info->offset_count,sizeof(*stream_info->offsets)); if (stream_info->offsets == (ssize_t *) NULL) -- 2.40.0