Skip to content

Fix: version-aware data colour space validation; reject iccMAX-only spaces on v2/v4 (#1355)#1359

Merged
xsscx merged 1 commit into
InternationalColorConsortium:masterfrom
colourbill-ctrl:fix-1355-validator-colorspace-version
Jun 15, 2026
Merged

Fix: version-aware data colour space validation; reject iccMAX-only spaces on v2/v4 (#1355)#1359
xsscx merged 1 commit into
InternationalColorConsortium:masterfrom
colourbill-ctrl:fix-1355-validator-colorspace-version

Conversation

@colourbill-ctrl

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the #1355 investigation (see analysis). CIccProfile::CheckHeader() validated the header data colour space with the version-blind CIccInfo::IsValidSpace() and described failures via GetColorSpaceSigName(). Two spec-conformance problems for v2/v4 profiles:

  1. N-channel spaces (ncXXXX) were accepted on any version. They are an iccMAX (v5) construct — ICC.1 §7.2.8 / Table 15, for MultiplexLink / MultiplexVisualization / abstract. A v2/v4 data colour space must come from ICC.1 (v4.4.0.0) §7.2.6 / Table 19, which does not list them. A v4 profile carrying e.g. 0x6E630003 passed validation unflagged.
  2. A zero data colour space (0x00000000) was reported as NoData: Unknown color space!. NoData is a legitimate v5-only descriptor (Table 15); printing it on a v2/v4 profile lends an invalid value undue legitimacy.

Fix

Gate both iccMAX-only families (zero and ncXXXX) by major version. On a v2/v4 profile they are now a critical error and the diagnostic reports the raw value instead of the friendly descriptor:

 - Invalid data colour space (0x00000000) for a v2/v4 profile; only iccMAX (v5) permits this!

v5 behaviour is unchanged: NoData stays valid for NamedColor / Multiplex classes and ncXXXX spaces stay valid.

Verification

Profile Before After
v4, 0x00000000 (the #1355 profile) NoData: Unknown color space! Invalid data colour space (0x00000000) for a v2/v4 profile…
v4, 0x6E630003 (nc, 3-ch) accepted (unflagged) Invalid data colour space (0x6E630003) for a v2/v4 profile…
v5, 0x6E630003 (nc, 3-ch) accepted accepted (unchanged)
v4, normal RGB display clean clean (no false positive)

Notes / scope

🤖 Generated with Claude Code

…paces on v2/v4 (InternationalColorConsortium#1355)

CIccProfile::CheckHeader() validated the header data colour space with the
version-blind CIccInfo::IsValidSpace(), and reported failures via
GetColorSpaceSigName(). Two problems for v2/v4 profiles:

1. The N-channel spaces ncXXXX (icSigNChannelData family) were accepted on any
   version. They are an iccMAX (v5) construct (ICC.1 7.2.8 / Table 15, for
   MultiplexLink / MultiplexVisualization / abstract); a v2/v4 data colour
   space must come from ICC.1 (v4.4.0.0) 7.2.6 / Table 19, which does not list
   them. A v4 profile carrying e.g. 0x6E630003 passed validation unflagged.

2. A zero data colour space (0x00000000) was reported as "NoData: Unknown color
   space!". "NoData" is a legitimate v5-only descriptor (Table 15) and lends
   the value undue legitimacy on a v2/v4 profile where it is simply invalid.

Gate both iccMAX-only families (zero and ncXXXX) by major version: on a v2/v4
profile they are now rejected as a critical error, and the diagnostic reports
the raw value -- "Invalid data colour space (0x........) for a v2/v4 profile;
only iccMAX (v5) permits this!" -- instead of the friendly descriptor. v5
behaviour is unchanged: NoData remains valid for NamedColor / Multiplex classes
and ncXXXX spaces remain valid.

Verified: v4 0x00000000 and v4 0x6E630003 now flagged with their raw values; the
same ncXXXX space on a v5 profile is still accepted; a normal v4 RGB profile
reports no colour-space error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Source C or C++ source code changes label Jun 15, 2026
@xsscx xsscx added this to the v2.3.2.2 milestone Jun 15, 2026
@xsscx xsscx linked an issue Jun 15, 2026 that may be closed by this pull request

@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-15 18:22:25 UTC

@xsscx xsscx enabled auto-merge (squash) June 15, 2026 18:22
@xsscx xsscx merged commit 53f6ad6 into InternationalColorConsortium:master Jun 15, 2026
30 checks passed
@xsscx xsscx mentioned this pull request Jun 15, 2026
xsscx pushed a commit that referenced this pull request Jun 15, 2026
…ngs they surface (#1361) (#1365)

Signed-off-by: David Hoyt <dhoyt@hoyt.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Source C or C++ source code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research: File LCDDisplayCat8Obs.icc

2 participants