mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibGfx: Teach all image decoders to fail on bitmap allocation failure
We don't need to wait for oss-fuzz to find this for us. :^)
This commit is contained in:
parent
71d92cef17
commit
c7d0c2ee7a
7 changed files with 27 additions and 2 deletions
|
@ -297,7 +297,11 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
|
|||
if (context.state < GIFLoadingContext::State::FrameComplete) {
|
||||
start_frame = 0;
|
||||
context.frame_buffer = Bitmap::create_purgeable(BitmapFormat::RGBA32, { context.logical_screen.width, context.logical_screen.height });
|
||||
if (!context.frame_buffer)
|
||||
return false;
|
||||
context.prev_frame_buffer = Bitmap::create_purgeable(BitmapFormat::RGBA32, { context.logical_screen.width, context.logical_screen.height });
|
||||
if (!context.prev_frame_buffer)
|
||||
return false;
|
||||
} else if (frame_index < context.current_frame) {
|
||||
start_frame = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue