crates/gamut-tiff/src/metadata.rs resolves one flat pointer list — [ExifIFD, InteroperabilityIFD] — at every node of IFD 0's subtree, exactly as gamut_ifd::read_tree applies
one to a whole file. That leaves one node where a member of the list does not belong:
InteroperabilityIFD (40965) is followed at IFD 0, where EXIF 2.3 §4.6.3 puts no such tag —
it belongs inside the Exif directory.
It is documented as an over-reach and it is harmless today: a TIFF whose IFD 0 carries tag 40965 is
already out of spec, and the group it resolves into feeds no field of TiffMetadata either way.
What it costs is a failure mode — a dangling tag-40965 offset at IFD 0 fails a call that returns
nothing from it — which is the same class of defect that took SubIFDs and GPSInfo out of the
list in the first place.
Narrowing it needs a per-node pointer list (ExifIFD at IFD 0, InteroperabilityIFD below
it), which is a gamut-ifd surface rather than a scoping decision gamut-tiff can make on its own
— and it interacts with #580, which proposes hoisting the scoped resolver into
gamut-ifd. Decide the two together.
Filed from the review of #520.
crates/gamut-tiff/src/metadata.rsresolves one flat pointer list —[ExifIFD, InteroperabilityIFD]— at every node of IFD 0's subtree, exactly asgamut_ifd::read_treeappliesone to a whole file. That leaves one node where a member of the list does not belong:
InteroperabilityIFD(40965) is followed at IFD 0, where EXIF 2.3 §4.6.3 puts no such tag —it belongs inside the Exif directory.
It is documented as an over-reach and it is harmless today: a TIFF whose IFD 0 carries tag 40965 is
already out of spec, and the group it resolves into feeds no field of
TiffMetadataeither way.What it costs is a failure mode — a dangling tag-40965 offset at IFD 0 fails a call that returns
nothing from it — which is the same class of defect that took
SubIFDsandGPSInfoout of thelist in the first place.
Narrowing it needs a per-node pointer list (
ExifIFDat IFD 0,InteroperabilityIFDbelowit), which is a
gamut-ifdsurface rather than a scoping decisiongamut-tiffcan make on its own— and it interacts with #580, which proposes hoisting the scoped resolver into
gamut-ifd. Decide the two together.Filed from the review of #520.