Files
photocraft/crates/codecs/tests
Dylan M. Taylor f45711c749 codecs: check TIFF structural tags, predicted rows and JPEG chunk frames (#10983)
* codecs: check TIFF structural tags, predicted rows and JPEG chunk frames

- Duplicate structural tags: the directory checks read a tag's first
  entry and the tiff crate its last, so a small SamplesPerPixel first
  and a large one last was admitted with one value and sized with the
  other. A repeated structural tag is now refused.
- Floating-point predictor: the tiff crate reads each tile row at its
  full stored width into a buffer of its own, outside the scratch cap.
  That row (TileWidth x samples x sample size) must now fit the cap.
- JPEG-compressed chunks: the tiff crate decodes each chunk into a
  whole JPEG image sized by the embedded frame header, with no limits.
  Each chunk's frame (read from the chunk or JPEGTables, at most 256
  marker segments in) must now fit the nominal strip or tile, as
  libtiff requires, and its decoded size must fit the scratch cap.

* address review: JPEG chunk dedup by count, offset-2 frame, shared fill budget

* address review: bound JPEG chunk list by scratch cap

* address review: reserve JPEG chunk list at the budgeted length
2026-11-10 17:57:55 -05:00
..