Skip to content

Commit

Permalink
conditionally compile heif_context_set_maximum_image_size_limit()
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Feb 15, 2025
1 parent 568daab commit bc4d820
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coders/heic.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,10 @@ static Image *ReadHEICImage(const ImageInfo *image_info,
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
max_size=(int) MagickMin(MagickMin(GetMagickResourceLimit(WidthResource),
GetMagickResourceLimit(HeightResource)),INT_MAX);
#if LIBHEIF_NUMERIC_VERSION >= HEIC_COMPUTE_NUMERIC_VERSION(1,19,0)
if (max_size != INT_MAX)
heif_context_set_maximum_image_size_limit(heif_context,max_size);
heif_context_set_maximum_image_size_limit(heif_context,max_size);'
#endif
error=heif_context_read_from_file(heif_context,image->filename,
(const struct heif_reading_options *) NULL);
if (IsHEIFSuccess(image,&error,exception) == MagickFalse)
Expand Down

0 comments on commit bc4d820

Please sign in to comment.