Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Detect and ignore invalid IFD offsets #13

Merged
merged 2 commits into from
Jan 15, 2018

Conversation

rubenv
Copy link

@rubenv rubenv commented Jan 15, 2018

Some files have IFD offset pointers that point outside of the image
file. This can be detected and ignored.

Fixes #12

@rubenv
Copy link
Author

rubenv commented Jan 15, 2018

I had to add a TiffError type to be able to detect this error. It can be used in all other places where the code currently does tiff: .... Didn't want to make the PR unclear so that's not included yet. I can submit another PR if desired.

@xor-gate
Copy link
Owner

Looks good, only it break on go < 1.7 due to missing io.SeekStart see https://travis-ci.org/xor-gate/goexif2/jobs/329060365#L474. You may also change the tiff: ... in this PR.

@rubenv
Copy link
Author

rubenv commented Jan 15, 2018

@xor-gate Already pushed a fix for the missing constant. Will adjust the error messages.

Some files have IFD offset pointers that point outside of the image
file. This can be detected and ignored.

Fixes xor-gate#12
@rubenv
Copy link
Author

rubenv commented Jan 15, 2018

@xor-gate All done!

@xor-gate
Copy link
Owner

Awesome, thanks!

@xor-gate xor-gate merged commit e5a111b into xor-gate:develop Jan 15, 2018
xor-gate added a commit that referenced this pull request Jan 15, 2018
* Detect and ignore invalid IFD offsets

Some files have IFD offset pointers that point outside of the image
file. This can be detected and ignored.

Fixes #12

* Always use TiffError
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants