1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-16 14:57:35 +00:00

LibGfx: Fix heap-overflow in BMP RLE

The field previously named 'data_size' apparently was misunderstood.
This commit is contained in:
Ben Wiederhake 2020-12-01 22:01:15 +01:00 committed by Andreas Kling
parent d66b0683eb
commit 461bdeda2b

View file

@ -931,7 +931,7 @@ static bool uncompress_bmp_rle_data(BMPLoadingContext& context, ByteBuffer& buff
return false;
}
Streamer streamer(context.file_bytes + context.data_offset, context.file_size);
Streamer streamer(context.file_bytes + context.data_offset, context.file_size - context.data_offset);
auto compression = context.dib.info.compression;