mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 22:17:53 -06:00
check_image bounded the image but not its tiles, whose nominal size comes from the file: a 16x16 DNG with one 16384x16384 lossless-JPEG tile (coded 16 rows tall) passed the header-only import, then the full decode resized that tile to 512 MiB (N x 2 GiB with more tiles). check_image now bounds the sum of the chunks' nominal samples to four times the image's (a tile grid no larger than the image covers less than twice each dimension), with a floor of one 2048x2048 tile for tiny images. That covers DNG and both ARW tiled readers, in the header probe and the full decode. The #1512 test keeps covering the uncompressed little-data check with a 2048x2048 tile; a 16384x16384 one is now refused earlier.