8273838: Enhanced BMP processing

Reviewed-by: yan
This commit is contained in:
Andrew Brygin 2021-09-28 13:30:27 +00:00
parent d91d3e7350
commit 030c3690f2

View File

@ -492,7 +492,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
}
if (metadata.compression == BI_RGB) {
long imageDataSize = (width * height * (bitsPerPixel / 8));
long imageDataSize = ((long)width * height * (bitsPerPixel / 8));
if (imageDataSize > (bitmapFileSize - bitmapOffset)) {
throw new IIOException(I18N.getString("BMPImageReader9"));
}