Commit Graph

7 Commits

Author SHA1 Message Date
Mitchell Hashimoto
590d669c4a terminal/kitty: limit png decoder allocations
Limit individual allocator requests made by PNG decoders to the Kitty
graphics protocol's 400 MiB image ceiling. Add a reusable allocator
wrapper for callers that need per-request bounds.

PNG decoding previously used Wuffs' 4 GiB package limit and checked
the result only after allocation. A tiny PNG with oversized dimensions
could cause a multi-gigabyte RSS spike before being rejected.

Wrap decoder allocators with LimitedAllocator and translate limit
rejections to invalid image data while preserving genuine out-of-memory
errors. Add allocator boundary tests and regression coverage for a
crafted PNG below Wuffs' limit.
2026-08-05 08:24:42 -07:00
Uzair Aftab
02f34835ea datastruct: remove unused LRU implementation 2026-08-04 19:46:26 +02:00
Mitchell Hashimoto
c179de62a7 extract deepEqual 2026-01-09 08:59:05 -08:00
Mitchell Hashimoto
ad8a6e0642 search thread needs to take an allocated needle 2025-11-26 08:50:04 -08:00
Mitchell Hashimoto
3e767c166c datastruct: split tree node removal 2025-08-07 08:14:02 -07:00
Mitchell Hashimoto
3aff43b2e8 datastruct: add intrusive doubly linked list 2024-11-07 14:57:55 -08:00
Mitchell Hashimoto
a436bd0af6 move datastructures to dedicated "datastruct" package 2024-11-07 14:39:10 -08:00