ladybird/Tests/LibGfx
sideshowbarker 9d64cd8c9b LibGfx: Reject the Invalid bitmap format from IPC decoders
Problem: A borked process sending a Gfx::Bitmap (inside BitmapSequence)
or a Gfx::ShareableBitmap over IPC could set BitmapFormat::Invalid as
the format field. The receiving process then aborted while decoding the
message — an IPC-reachable crash.

Cause: The helper that both decoders use for validating the format read
off the wire accepts BitmapFormat::Invalid. The decoders go on to build
a bitmap with that format. But that triggers an assert — because
minimum_pitch only knows the four real pixel formats.

Fix: Drop BitmapFormat::Invalid from is_valid_bitmap_format. It’s an
indicator of an absent/unknown format, never one a real bitmap can have.
And any real bitmap is never encoded with it. So, both BitmapSequence
and ShareableBitmap decode now return a clean decode error for it.
2026-06-19 10:33:36 +02:00
..
test-inputs LibGfx: Reject a BMP V5 ICC profile offset that points out of bounds 2026-06-15 20:19:33 +09:00
BenchmarkJPEGLoader.cpp Everywhere: Remove Serenity specific code from tests 2024-07-05 07:29:51 +02:00
CMakeLists.txt LibGfx: Reject the Invalid bitmap format from IPC decoders 2026-06-19 10:33:36 +02:00
TestBitmapExport.cpp LibGfx: Move bitmap export out of ImmutableBitmap 2026-05-05 14:39:17 -05:00
TestColor.cpp LibGfx: Implement WCAG's contrast ratio in Color 2026-06-09 17:23:26 +02:00
TestImageDecoder.cpp LibGfx: Reject a BMP V5 ICC profile offset that points out of bounds 2026-06-15 20:19:33 +09:00
TestImageWriter.cpp LibGfx: Remove WebP animation writer and utility 2025-08-05 11:30:20 +02:00
TestQuad.cpp LibGfx: Verify Rect and Quad are consistent in boundary point inclusions 2024-12-15 23:27:42 +01:00
TestRect.cpp LibGfx+LibWeb: Delete unused Line class and Rect methods 2025-11-04 23:16:02 +01:00
TestShareableBitmap.cpp LibGfx: Reject the Invalid bitmap format from IPC decoders 2026-06-19 10:33:36 +02:00
TestWOFF.cpp LibGfx: Rename WOFF[2]::try_load_from_externally_owned_memory() 2025-05-03 12:01:43 +01:00
TestWOFF2.cpp Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
TestYUVData.cpp LibGfx: Preserve native YUV samples for CPU conversion 2026-05-05 14:39:17 -05:00