From 9ead0dd75e70bd233867c43d0ae047a2c80629c3 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 10 Mar 2018 21:23:12 -0500 Subject: [PATCH] ... --- coders/bmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/bmp.c b/coders/bmp.c index 36fd03b0e..7cf8b7d24 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -961,7 +961,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) bmp_info.bits_per_pixel<<=1; bytes_per_line=4*((image->columns*bmp_info.bits_per_pixel+31)/32); length=(size_t) bytes_per_line*image->rows; - if ((MagickSizeType) length > GetBlobSize(image)) + if (((MagickSizeType) length/8) > GetBlobSize(image)) ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); if ((bmp_info.compression == BI_RGB) || (bmp_info.compression == BI_BITFIELDS)) -- 2.40.0