Skip to content

gamut-tiff: InteroperabilityIFD is followed at IFD 0, where no conformant file puts it #582

Description

@justin13888

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions