From: Cristy Date: Fri, 16 Feb 2018 12:40:07 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6406 X-Git-Tag: 7.0.7-23~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17e4cde10e8f05964f9d5f79599d6691f366e54b;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6406 --- diff --git a/coders/mat.c b/coders/mat.c index 24cd32d2f..ba96f8fc9 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -877,7 +877,6 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) int sample_size; MagickOffsetType filepos=0x80; BlobInfo *blob; - size_t one; unsigned int (*ReadBlobXXXLong)(Image *image); unsigned short (*ReadBlobXXXShort)(Image *image); @@ -1162,8 +1161,7 @@ RestoreMSCWarning (void) sample_size; image->columns = MATLAB_HDR.SizeX; image->rows = MATLAB_HDR.SizeY; - one=1; - image->colors = one << image->depth; + image->colors = GetQuantumRange(image->depth); if (image->columns == 0 || image->rows == 0) goto MATLAB_KO; if((unsigned long)ldblk*MATLAB_HDR.SizeY > MATLAB_HDR.ObjectSize)