Skip to content

Fix several issues with creating transforms for spectral profiles#1335

Merged
xsscx merged 5 commits into
masterfrom
issue-1328
Jun 13, 2026
Merged

Fix several issues with creating transforms for spectral profiles#1335
xsscx merged 5 commits into
masterfrom
issue-1328

Conversation

@ChrisCoxArt

Copy link
Copy Markdown
Contributor

Make several CMM routines return error codes to deal with bad illuminant and observer pointers.
Make sure they all return errors when NULL pointers are found.
Check return values in calling routines and propagate the error back out.
Return error instead of dividing by zero.
Check that the illuminant range has enough samples to create XYZ.
And fix a minor compiler warning.

Fixes #1328, #1329, #1330 (they all build on the fix for 1328)

Checklist

  • Signed all Commits in PR
  • Built locally according to docs/build.md
  • Followed the guidelines in Contributing document
  • New source files include the ICC copyright and BSD 3-Clause license header
  • Code style matches nearby code: 2-space indent, K&R braces, m_ members

Legal Requirements

All official software projects hosted by the International Color Consoritum (ICC)
follows the open source software best practice policies. The International Color Consoritum IP policy governs ICC specification development and contributions to ICC open source software. Software contributions are also covered by the Contributor License Agreement (CLA).

Contributor License Agreements

Developers who wish to contribute code to be considered for inclusion
in ICC software must first complete a Contributor License Agreement
(CLA)
.

There is no cost or membership requirement to sign the ICC Contributor License Agreement (CLA). Please note that this is different from membership in the International Color Consortium (ICC). If your organization relies on our projects, please become a member. Membership dues are an essential source of funding and investment for these projects.

  • If you are an individual writing the code on your own time and you are SURE you are the sole owner of any intellectual property you contribute, you can sign the CLA as an individual contributor.

  • If you are writing the code as part of your job, or if there is any possibility that your employer might think they own any intellectual property you create, then you should use the Corporate Contributor Licence Agreement

License

ICC software is licensed under the BSD 3-Clause "New" or "Revised" License. Contributions to ICC software projects should abide by that license unless otherwised specified or approved by the ICC.

Copyright Notices

All new source files must begin with the ICC Copyright notice and include or reference the BSD 3-Clause "New" or "Revised" License.

INTELLECTUAL PROPERTY & PATENTS

Participation in ICC's development activities is subject to ICC's Patent Policy.

Maintainer Review Required

If you have questions, contact a listed Maintainer.

@github-actions github-actions Bot added Tools Command-line tool or GUI tool changes Source C or C++ source code changes pending CI checks still running labels Jun 13, 2026
Because illuminant and observer pointers can be NULL, and we need to return error values for stuff like that
Also fix other locations where illum and observer were not tested before dereference
Fixes #1328
@ChrisCoxArt

Copy link
Copy Markdown
Contributor Author

rebased after merging 2 other PRs.

@xsscx xsscx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

2026-06-13 22:41:15 UTC

@github-actions github-actions Bot added passed All CI checks passed Merge Ready Approved, mergeable, and all CI checks passed and removed pending CI checks still running labels Jun 13, 2026
@xsscx xsscx merged commit c0d0fc2 into master Jun 13, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merge Ready Approved, mergeable, and all CI checks passed passed All CI checks passed Source C or C++ source code changes Tools Command-line tool or GUI tool changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI 762dc57: IccCmm.cpp:3038:25: runtime error: null pointer passed as argument 2

2 participants