mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-29 04:17:11 -06:00
Each DHT definition for table id 0..3 calls Huffman::new, which allocates and fills a ~48 KiB lookup pair. A stream repeating DHT definitions (and DNG tiles referencing such a stream) could rebuild tables thousands of times, multiplying header-processing cost and memory churn while producing little output. A real lossless JPEG uses a handful of Huffman tables; cap cumulative table builds per stream at 64 and reject streams that exceed it. Finding: 7a31b581-d1b7-4f9c-91e5-ce42b47db87f (CWE-400)