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
commit 461bdeda2b
Notes: sideshowbarker 2024-07-19 01:06:42 +09:00

View file

@ -931,7 +931,7 @@ static bool uncompress_bmp_rle_data(BMPLoadingContext& context, ByteBuffer& buff
return false; 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; auto compression = context.dib.info.compression;