Skip to content

Add protection against corrupted embedded ICC profile #18977

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victoryforce
Copy link
Collaborator

This PR adds crash protection in a situation where we read an embedded ICC profile from an image file, but it is corrupted to the point that lcms2 cannot open it as a profile.

Never seen this in the wild, it's more of a theoretical possibility (after all, although this is an extremely rare story, bit rot is possible).

To test this PR, you can download the file m1-3c6b71d657852e13d0b5dfc0906343f5.tif from gimp-test-images testset. After this PR, darktable shows that it cannot read the file, but does not crash.

@TurboGit TurboGit modified the milestones: 5.2.1, 5.4 Jun 22, 2025
@TurboGit TurboGit added bugfix pull request fixing a bug feature: enhancement current features to improve scope: color management ensuring consistency of colour adaptation through display/output profiles release notes: pending labels Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix pull request fixing a bug feature: enhancement current features to improve release notes: pending scope: color management ensuring consistency of colour adaptation through display/output profiles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants