From 13720970982b239bc3334b3d845b8edff03570c7 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 10 Mar 2018 12:43:25 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6818 --- coders/dcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coders/dcm.c b/coders/dcm.c index 5c8646468..ebace2e68 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3789,6 +3789,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