From: Dirk Lemstra Date: Thu, 29 Mar 2018 20:00:19 +0000 (+0200) Subject: Minor refactor X-Git-Tag: 7.0.7-29~278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b747f1960658a2a5f49bb620a0fa23321137be38;p=imagemagick Minor refactor --- diff --git a/coders/tiff.c b/coders/tiff.c index c9a12cc09..12f7e688b 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1724,12 +1724,12 @@ RestoreMSCWarning char value[MagickPathExtent]; + if (rows_per_strip > (image->columns*image->rows)) + ThrowTIFFException(CorruptImageError,"ImproperImageHeader"); method=ReadStripMethod; (void) FormatLocaleString(value,MagickPathExtent,"%u", (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) ||