1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:57:34 +00:00

LibGfx: Remove maximum size limit for decoded images

It is unlikely this is needed anymore, and as pointed out things should
now safely return OOM if the bitmap is too large to allocate.

Also, no recently added decoders respected this limit anyway.

Fixes #20872
This commit is contained in:
MacDue 2023-09-01 22:58:35 +01:00 committed by Andreas Kling
parent 13d1c37ea0
commit bbf66ea055
6 changed files with 0 additions and 28 deletions

View file

@ -1245,11 +1245,6 @@ static ErrorOr<void> read_start_of_frame(JPEGStream& stream, JPEGLoadingContext&
return Error::from_string_literal("Image frame height of width null");
}
if (context.frame.width > maximum_width_for_decoded_images || context.frame.height > maximum_height_for_decoded_images) {
dbgln("This JPEG is too large for comfort: {}x{}", context.frame.width, context.frame.height);
return Error::from_string_literal("JPEG too large for comfort");
}
set_macroblock_metadata(context);
auto component_count = TRY(stream.read_u8());