mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -933,11 +933,6 @@ static ErrorOr<void> process_IHDR(ReadonlyBytes data, PNGLoadingContext& context
|
||||
|
||||
auto const& ihdr = *(const PNG_IHDR*)data.data();
|
||||
|
||||
if (ihdr.width > maximum_width_for_decoded_images || ihdr.height > maximum_height_for_decoded_images) {
|
||||
dbgln("This PNG is too large for comfort: {}x{}", (u32)ihdr.width, (u32)ihdr.height);
|
||||
return Error::from_string_literal("This PNG is too large for comfort");
|
||||
}
|
||||
|
||||
if (!is_valid_compression_method(ihdr.compression_method)) {
|
||||
dbgln("PNG has invalid compression method {}", ihdr.compression_method);
|
||||
return Error::from_string_literal("Unsupported compression method");
|
||||
|
||||
Reference in New Issue
Block a user