From c16937ef6ed19ef9c68ed8322cf9ad52abb9833b Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 22 Feb 2018 09:06:13 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6271 --- coders/dcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/dcm.c b/coders/dcm.c index 589b5b973..1f66bba66 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3825,7 +3825,10 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) if (tag == 0xFFFEE0DD) break; /* sequence delimiter tag */ if (tag != 0xFFFEE000) - ThrowDCMException(CorruptImageError,"ImproperImageHeader"); + { + read_info=DestroyImageInfo(read_info); + ThrowDCMException(CorruptImageError,"ImproperImageHeader"); + } file=(FILE *) NULL; unique_file=AcquireUniqueFileResource(filename); if (unique_file != -1) -- 2.40.0