From 92187d2e4e1980b31ff2aa174d7f917d0945e175 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Fri, 22 May 2026 11:18:15 +0200 Subject: sixel: clamp max width/height in 'CSI ? 2 ; 3 ; W ; H S' This ensures the user cannot raise the maximum sixel size, where width*height cannot be represented as an integer. Note, we should consider moving all sixel width/height variables from int to size_t. But, since it doesn't make any sense with overly large sixel images, clamping the max width/height is enough. Add a static_assert() that checks SIXEL_MAX_WIDTH * SIXEL_MAX_HEIGHT doesn't overflow. Closes #2343 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 464f096f..ee6a979d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,10 +82,13 @@ * DECCRA not clamping or verifying the destination rectangle ([#2352][2352]). * Empty selection clearing the clipboard ([#2327][2327]). +* Sixel image max size not clamped, causing foot to crash on very + large sixel images ([#2343][2343]). [2353]: https://codeberg.org/dnkl/foot/issues/2353 [2352]: https://codeberg.org/dnkl/foot/issues/2352 [2327]: https://codeberg.org/dnkl/foot/issues/2327 +[2343]: https://codeberg.org/dnkl/foot/issues/2343 ### Security -- cgit v1.3