Skip to content

Commit

Permalink
Corrected check for max channels in the tiff decoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Nov 11, 2024
1 parent 55b638f commit 3fb1215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
}
tiff_status=TIFFGetFieldDefaulted(tiff,TIFFTAG_EXTRASAMPLES,&extra_samples,
&sample_info,sans);
if ((samples_per_pixel+extra_samples) > MaxPixelChannels)
if (samples_per_pixel > MaxPixelChannels)
{
TIFFClose(tiff);
ThrowReaderException(CorruptImageError,"MaximumChannelsExceeded");
Expand Down

0 comments on commit 3fb1215

Please sign in to comment.