diff --git a/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp index 6ec65acd15..3243b85694 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/ILBMLoader.cpp @@ -289,6 +289,9 @@ static ErrorOr decode_iff_chunks(ILBMLoadingContext& context) } } + if (context.state != ILBMLoadingContext::State::BitmapDecoded) + return Error::from_string_literal("Missing body chunk"); + return {}; }