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: Update the cICP implementation yet more #631

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

ctruta
Copy link
Member

@ctruta ctruta commented Jan 2, 2025

For the sake of completeness:

  • Add the cICP entry to the list of known chunks to ignore inside png_set_keep_unknown_chunks.
  • Handle cICP in png_read_end, alongside cHRM, gAMA, iCCP, sRGB.
  • In pngtest.c, move the cICP test code near cHRM, gaMA, iCCP, sRGB.

Copy link
Contributor

@jbowler jbowler left a comment

Choose a reason for hiding this comment

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

Yes, I think so. The "ignore" list change is certainly correct unless I made a mistake with the ASCII values (perhaps PNG_A, PNG_B etc would help). The png_read_end change seems correct although the bug is harmless. I dislike the whole approach of having to add function calls to multiple places but that's nothing specific to this change.

For the sake of completeness:
 * Add the cICP entry to the list of known chunks to ignore inside
   `png_set_keep_unknown_chunks`.
 * Handle cICP in `png_read_end`, alongside cHRM, gAMA, iCCP, sRGB.
 * In pngtest.c, move the cICP test code near cHRM, gaMA, iCCP, sRGB.

Reviewed-by: John Bowler <[email protected]>
Signed-off-by: Cosmin Truta <[email protected]>
@ctruta ctruta merged commit 27c2ac7 into pnggroup:libpng18 Jan 3, 2025
1 check passed
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.

2 participants