From 6fe6a0e6c901b4c9a639c104cc3420239e387794 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 18 Jun 2019 13:49:26 -0400 Subject: [PATCH] ... --- coders/tiff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/tiff.c b/coders/tiff.c index 97402f2cb..c476e90dd 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -3618,7 +3618,8 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, } mode=endian_type == LSBEndian ? "wl" : "wb"; #if defined(TIFF_VERSION_BIG) - if (LocaleCompare(image_info->magick,"TIFF64") == 0) + if ((LocaleCompare(image_info->magick,"TIFF64") == 0) || + (((MagickOffsetType) image->columns*image->rows) > SSIZE_MAX)) mode=endian_type == LSBEndian ? "wl8" : "wb8"; #endif tiff=TIFFClientOpen(image->filename,mode,(thandle_t) image,TIFFReadBlob, -- 2.49.0