From: Cristy Date: Sat, 24 Mar 2018 19:14:45 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7106 X-Git-Tag: 7.0.7-28~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3e7c6db0efd50a9bf9113d081bde0c5e9c45a17;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7106 --- diff --git a/coders/tiff.c b/coders/tiff.c index b1508e7bf..a90680112 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1729,6 +1729,8 @@ RestoreMSCWarning (unsigned int) rows_per_strip); (void) SetImageProperty(image,"tiff:rows-per-strip",value,exception); } + if (rows_per_strip > (image->columns*image->rows)) + ThrowTIFFException(CorruptImageError,"ImproperImageHeader"); if ((samples_per_pixel >= 3) && (interlace == PLANARCONFIG_CONTIG)) if ((image->alpha_trait == UndefinedPixelTrait) || (samples_per_pixel >= 4))