photocraft/crates/psd/tests
Valentin Klein fd351918e5
PSD: cap the layer tree for psd_to_document; layered TIFF checks group depth (#2940) (#2975)
The file-open path rejects PSDs nested past MAX_GROUP_DEPTH before
conversion, but the public psd_to_document built file.layer_tree() to the
file's full depth (~16000 levels) before Ctx::build capped it, and layered
TIFF reached it with no preflight at all.

- photocraft-psd: PsdFile::layer_tree_max_depth(n) builds the tree
  iteratively and drops the children of groups nested n deep, so walking
  or dropping it recursively is bounded. layer_tree() is the uncapped case.
- psd_to_document uses it with MAX_GROUP_DEPTH, the same cap Ctx::build
  and apply_link_groups apply, so imports are unchanged.
- Layered TIFF rejects nesting past the cap with the same error as a PSD
  (shared psd_import::check_group_depth).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:20:32 -04:00
..
builder.rs fix(psd): Improve interoperability and decoding (#1955) 2026-10-11 03:46:52 -04:00
corpus.rs Photoshop oracles via storytold/photocraft-corpus: pinned corpora, corpus feature, test-corpus, CI job (#190) (#190) 2026-10-05 17:47:33 -04:00
layer_block_order.rs PSD save: stream Lr16/Lr32 layer blocks into the output (#1158) 2026-10-09 01:13:22 -04:00
malformed.rs PSD: don't inflate an over-budget ZIP merged image at parse time (#2926) (#2967) 2026-10-11 10:40:31 -04:00
proptests.rs fix(psd): Improve interoperability and decoding (#1955) 2026-10-11 03:46:52 -04:00
roundtrip.rs PSD: a spec-order mask record is not misread as Photoshop's order when that reading is implausible (#949) (#1129) 2026-10-08 14:30:56 -04:00
tree.rs PSD: cap the layer tree for psd_to_document; layered TIFF checks group depth (#2940) (#2975) 2026-10-11 11:20:32 -04:00