We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e238e5 commit 456771fCopy full SHA for 456771f
coders/bmp.c
@@ -1132,6 +1132,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
1132
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
1133
if (bmp_info.compression == BI_RLE4)
1134
bmp_info.bits_per_pixel<<=1;
1135
+ if (BMPOverflowCheck(image->columns,bmp_info.bits_per_pixel) != MagickFalse)
1136
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
1137
extent=image->columns*bmp_info.bits_per_pixel;
1138
bytes_per_line=4*((extent+31)/32);
1139
if (BMPOverflowCheck(bytes_per_line,image->rows) != MagickFalse)
0 commit comments