From 7ae5ab9ed1fb6b0e450852dacf3cefebaa3764c2 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 13 Apr 2018 01:04:33 +0200 Subject: [PATCH] Clamp rows_per_strip instead of throwing an exception (fixes #1091) --- coders/tiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/tiff.c b/coders/tiff.c index 2afc1cad9..0f84a4238 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1734,7 +1734,7 @@ RestoreMSCWarning (void) SetImageProperty(image,"tiff:rows-per-strip",buffer,exception); } if (rows_per_strip > (uint32) image->rows) - ThrowTIFFException(CorruptImageError,"ImproperImageHeader"); + rows_per_strip=(uint32) image->rows; if ((samples_per_pixel >= 3) && (interlace == PLANARCONFIG_CONTIG)) if ((image->alpha_trait == UndefinedPixelTrait) || (samples_per_pixel >= 4)) -- 2.40.0