diff --git a/Libraries/LibGfx/BMPLoader.cpp b/Libraries/LibGfx/BMPLoader.cpp index b1e66e43ff..2e37c840a6 100644 --- a/Libraries/LibGfx/BMPLoader.cpp +++ b/Libraries/LibGfx/BMPLoader.cpp @@ -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;