mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +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:
parent
13d1c37ea0
commit
bbf66ea055
6 changed files with 0 additions and 28 deletions
|
@ -550,11 +550,6 @@ static bool decode_bmp_core_dib(BMPLoadingContext& context, InputStreamer& strea
|
|||
return false;
|
||||
}
|
||||
|
||||
if (static_cast<size_t>(core.width) > maximum_width_for_decoded_images || static_cast<size_t>(abs(core.height)) > maximum_height_for_decoded_images) {
|
||||
dbgln("This BMP is too large for comfort: {}x{}", core.width, abs(core.height));
|
||||
return false;
|
||||
}
|
||||
|
||||
auto color_planes = streamer.read_u16();
|
||||
if (color_planes != 1) {
|
||||
dbgln("BMP has an invalid number of color planes: {}", color_planes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue