From: Cristy Date: Tue, 15 Oct 2019 22:03:11 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.9-0~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9b81c8d5f2376f64fd1f9b5339a98b979df6cdd;p=imagemagick ... --- diff --git a/coders/wpg.c b/coders/wpg.c index a733a2f29..b4922624f 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -1337,7 +1337,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) - break; + goto Finish; AcquireNextImage(image_info,image,exception); image->depth=8; if (image->next == (Image *) NULL) @@ -1544,7 +1544,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) - break; + goto Finish; AcquireNextImage(image_info,image,exception); image->depth=8; if (image->next == (Image *) NULL)