From fab76f4ca665d1bf2e8cacc0676327365cc95c6f Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 7 Nov 2024 18:20:21 -0500 Subject: [PATCH] exit on error exception --- coders/png.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coders/png.c b/coders/png.c index e50372a98..50afe08b9 100644 --- a/coders/png.c +++ b/coders/png.c @@ -6730,6 +6730,12 @@ static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, return(DestroyImageList(image)); } + if (exception->severity > ErrorException) + { + (void) CloseBlob(image); + return(DestroyImageList(image)); + } + mng_info->image=image; if (mng_type)