mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-03 12:35:58 -05:00
* security: bound codec allocation to what a hostile file declares A GIF's first image descriptor could name a frame up to four times the canvas budget and be charged that allocation before any size check saw it; PNG's compressed text chunks were expanded through an unbounded inflate; JPEG handed hostile frame headers to the allocating decoders (zune for the common cases, jpeg-decoder for CMYK/scaled/lossless) and let an APP1 flood drive quadratic metadata reassembly. Each now refuses on the same max_pixels budget the other decoders honour, with a regression test per gate. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]> * Fix clippy collapsible_if in DCT-scale size check * Check jpeg-decoder header on scaled path; cap APP1 markers in decode_codes8 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Codebuff <[email protected]> Co-authored-by: Dylan Taylor <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>