From: Dirk Lemstra Date: Thu, 29 Mar 2018 19:58:44 +0000 (+0200) Subject: Fixed use of uninitialized value. X-Git-Tag: 7.0.7-29~279 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcc142eb963609eb0c9972f311ee079a62b0d10c;p=imagemagick Fixed use of uninitialized value. --- diff --git a/coders/tiff.c b/coders/tiff.c index 72ea08313..c9a12cc09 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1728,9 +1728,9 @@ RestoreMSCWarning (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 (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))