Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIFF module should check for overlapping tag data #105

Open
carlwilson opened this issue Sep 7, 2016 · 7 comments
Open

TIFF module should check for overlapping tag data #105

carlwilson opened this issue Sep 7, 2016 · 7 comments
Assignees
Labels
feature New functionality to be developed legacy Legacy bugs that require testing to establish status P3 Low priority bugs

Comments

@carlwilson
Copy link
Member

carlwilson commented Sep 7, 2016

Dev Effort

1D

Description

The TIFF specification says: "No data should be referenced from more than one place.TIFF readers and editors are under no obligation to detect this condition and handle it properly. This would not be a problem if TIFF files were read-only entities, but they are not. This warning covers both TIFF field value offsets and fields that are defined as offsets, such as StripOffsets."

The TIFF module doesn't currently check this, and some TIFF files cheat on this point, e.g., by using the same data storage for X and Y resolution if they're the same. Since this is a violation of the spec with regard to file structure, this should really be checked. We have a request for this check.

@carlwilson carlwilson added feature New functionality to be developed legacy legacy Legacy bugs that require testing to establish status labels Sep 7, 2016
@carlwilson carlwilson removed the legacy label Dec 11, 2018
@ghost ghost added the P3 Low priority bugs label Mar 7, 2019
@ghost ghost added this to the Dev hack week initiation milestone Mar 7, 2019
rgfeldman added a commit to rgfeldman/jhove that referenced this issue Apr 10, 2019
@ross-spencer
Copy link

@asciim0 you mentioned TIFF in the kick-off meeting today. I was wondering if you had any thoughts about this ticket?

Two things that would be a great help:

  1. Identifying this output in known files. Do you know any?
  2. or, simulating it in synthetic files to be tested against. Can you think of sensible examples we could create?

@marhop
Copy link
Member

marhop commented May 13, 2020

I have recently seen some real world files that would raise this error (and do raise it in DPFManager) but can't share them. I could create a minimal synthetic example though if you do not already have one. Interested?

@ross-spencer
Copy link

@marhop that would be awesome if you have time!

@marhop
Copy link
Member

marhop commented May 13, 2020

OK. Just give me some days, one week max.

@marhop
Copy link
Member

marhop commented May 14, 2020

Done. Here are two example files (source) that should raise this error.

The first has duplicate pointers in the XResolution and YResolution fields, both referencing the same offset (which would make a little sense if legal because they both use the same value). This error is detected by both DPFManager 3.5.1 and ExifTool 11.98, but not by JHOVE 1.24.

The second has duplicate pointers in the StripOffsets field, repeating the same offset four times to produce a sequence of repeated image data. This error is detected by neither DPFManager nor ExifTool nor JHOVE. I'm pretty confident though that this is indeed an error that should be detected. (It's just maybe not very likely to see this in real life because why would anyone do that?! Except as an eccentric compression method of course.)

Hope that helps,
Martin

PS: Both files raise some other errors in both DPFManager and ExifTool (but not JHOVE). I think though that these are rather bugs in the tools and not in the files, so never mind. (I already filed issues for these problems.)

@carlwilson
Copy link
Member Author

Thanks very much @marhop, that's appreciated.

@carlwilson carlwilson modified the milestones: Hackathon tasks , OPF Hackathon 2023 Tasks Jun 21, 2023
@carlwilson carlwilson removed this from the OPF Hackathon 2023 Tasks milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality to be developed legacy Legacy bugs that require testing to establish status P3 Low priority bugs
Projects
Status: No status
Development

No branches or pull requests

4 participants