From 4284601db63f98e420ec42b8df651a38af32311e Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 28 Apr 2018 15:04:17 -0400 Subject: [PATCH] ... --- coders/png.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coders/png.c b/coders/png.c index d366be3f0..78d436caa 100644 --- a/coders/png.c +++ b/coders/png.c @@ -6185,6 +6185,10 @@ static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, else { + if (loop_iters > GetMagickResourceLimit(ListLengthResource)) + loop_iters=GetMagickResourceLimit(ListLengthResource); + if (loop_iters >= 2147483647L) + loop_iters=2147483647L; mng_info->loop_jump[loop_level]=TellBlob(image); mng_info->loop_count[loop_level]=loop_iters; } -- 2.40.0