From: Dirk Lemstra Date: Sun, 14 Jul 2019 15:14:32 +0000 (+0200) Subject: Added missing allocation of the next image. X-Git-Tag: 7.0.8-54~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=411840d4380e962981ee1ddecd527c04132f1cb4;p=imagemagick Added missing allocation of the next image. --- diff --git a/coders/tim2.c b/coders/tim2.c index b19f5343b..890888284 100644 --- a/coders/tim2.c +++ b/coders/tim2.c @@ -757,6 +757,20 @@ static Image *ReadTIM2Image(const ImageInfo *image_info,ExceptionInfo *exception if (image_info->number_scenes != 0) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) break; + /* + Allocate next image structure. + */ + AcquireNextImage(image_info,image,exception); + if (GetNextImageInList(image) == (Image *) NULL) + { + status=MagickFalse; + break; + } + image=SyncNextImageInList(image); + status=SetImageProgress(image,LoadImagesTag,image->scene-1, + image->scene); + if (status == MagickFalse) + break; } (void) CloseBlob(image); if (status == MagickFalse)