Commit Graph

2 Commits

Author SHA1 Message Date
MacDue
95bf6ddb8e LibGfx: Fix serializing Gfx::Bitmaps
a396bb0 removed the palette field but did not update the allocation size
in `Bitmap::serialize_to_byte_buffer()`. This led to a few crashes (I
noticed this from a drag/drop crash in the file manager).

Fixes #21434
2023-10-15 20:34:29 +02:00
Darius Arnold
884d8b14ac LibGfx: Prevent out of bounds access when scaling small Bitmaps
Since the color interpolation requires two pixels in the horizontal and
vertical direction to work, 1 pixel wide or high bitmaps would cause a
crash when scaling. Fix this by clamping the index into the valid range.

Fixes #16047.
2023-05-24 08:12:14 +02:00