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

Fix ClassCastException when parsing Apple metadata of unexpected type #589

Merged
merged 3 commits into from
Sep 14, 2022
Merged

Fix ClassCastException when parsing Apple metadata of unexpected type #589

merged 3 commits into from
Sep 14, 2022

Conversation

mveunen
Copy link
Contributor

@mveunen mveunen commented Sep 13, 2022

Sometimes the Apple metadata is stored as a String. This fix will prevent a ClassCastException

We have found a few images where the JPG contained metadata as String instead of Bytes/Longs:. These images were created using an iPhone 7 or 8 with an unknown iOS version.

Examples of the metadata as String:
bplist00��������UflagsUvalueUepochYtimescaleQ1]3448599201458Q0Z1000000000����#-/=?
and
bplist00��������UflagsUvalueUepochYtimescaleQ1]3408834508875Q0Z1000000000����#-/=?

@drewnoakes
Copy link
Owner

Thank you for your contribution. Please undo the formatting changes so that we can more easily see what you have actually changed here.

@drewnoakes
Copy link
Owner

Also if you're able to share an image that reproduces this problem, it would be helpful.

Eunen van, M (Micha) added 2 commits September 13, 2022 13:19
@mveunen
Copy link
Contributor Author

mveunen commented Sep 13, 2022

Thank you for your contribution. Please undo the formatting changes so that we can more easily see what you have actually changed here.

Sorry, that was automatically done by my IDE. It should be better after the last commit

@mveunen
Copy link
Contributor Author

mveunen commented Sep 13, 2022

Also if you're able to share an image that reproduces this problem, it would be helpful.

Unfortunately I cannot share the images we have due to legal issues.

Copy link
Owner

@drewnoakes drewnoakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@drewnoakes drewnoakes merged commit e9ff975 into drewnoakes:master Sep 14, 2022
@drewnoakes drewnoakes changed the title Sometimes the Apple metadata is stored as a String. This fix will pre… Fix ClassCastException when parsing Apple metadata of unexpected type Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants