]> granicus.if.org Git - imagemagick/commitdiff
Call SetImageExtent to make sure the new width and height are allowed and the pixel...
authorDirk Lemstra <dirk@lemstra.org>
Tue, 8 Jan 2019 22:07:32 +0000 (23:07 +0100)
committerDirk Lemstra <dirk@lemstra.org>
Tue, 8 Jan 2019 22:08:51 +0000 (23:08 +0100)
coders/heic.c

index a27d53ea5552d1b5477bda16e12a61d3bc2e75b0..534e47bf4724932e0e707d36de8bfe8b2a6d1ba2 100644 (file)
@@ -301,9 +301,11 @@ static Image *ReadHEICImage(const ImageInfo *image_info,
       /* Correct the width and height of the image */
       image->columns=(size_t) heif_image_get_width(heif_image,heif_channel_Y);
       image->rows=(size_t) heif_image_get_height(heif_image,heif_channel_Y);
+      status=SetImageExtent(image,image->columns,image->rows,exception);
       heif_decoding_options_free(decode_options);
     }
-  if (IsHeifSuccess(&error,image,exception) == MagickFalse)
+  if ((IsHeifSuccess(&error,image,exception) == MagickFalse) ||
+      (status == MagickFalse))
     {
       heif_image_handle_release(image_handle);
       heif_context_free(heif_context);