Test: regression for XML zero (NoData) colour-space round-trip corruption (#1356)#1358
Merged
xsscx merged 1 commit intoJun 15, 2026
Conversation
…tion (InternationalColorConsortium#1356) Round-trips a profile whose data colour space is 0x00000000 (NoData) through iccToXml -> iccFromXml and fails if the value is corrupted to 0x4E554C4C. Before the InternationalColorConsortium#1356 fix, CIccProfileXml::ToXml() wrote the literal "NULL" for a zero data colour space / PCS signature; iccFromXml then reparsed "NULL" to 0x4E554C4C (the ASCII bytes 'N','U','L','L'), so a NoData header became "Unknown 'NULL' = 4E554C4C" after a round-trip -- the sole reason iccFromXml and iccFromJson disagreed on the same profile. The script asserts both that iccToXml does not emit <DataColourSpace>NULL</DataColourSpace> and that the round-tripped profile still reports NoData. Verified to FAIL on master (exit 2) and PASS once the InternationalColorConsortium#1356 writer guard lands. Plain functional test; skips cleanly when the tools or fixture are unavailable. Fixture: .github/ci/test-data/nodata-colourspace-1356.icc is the LCDDisplayCat8Obs.icc profile from the issue (data colour space 0x00000000). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Paired regression test for #1356. Round-trips a profile whose data colour space is
0x00000000(NoData) throughiccToXml -> iccFromXmland fails if the value is corrupted to0x4E554C4C.Before the #1356 fix,
CIccProfileXml::ToXml()wrote the literalNULLfor a zero data colour space / PCS signature;iccFromXmlthen reparsedNULLto0x4E554C4C(the ASCII bytesN,U,L,L), so a NoData header becameUnknown 'NULL' = 4E554C4Cafter a round-trip — the sole reasoniccFromXmlandiccFromJsondisagreed on the same profile.What it checks
iccToXmlmust not emit<DataColourSpace>NULL</DataColourSpace>for a zero signature.iccFromXml, the data colour space must still report NoData, not0x4E554C4C/Unknown 'NULL'.Plain functional round-trip test (no sanitizer build needed); skips cleanly when
iccToXml/iccFromXml/iccDumpProfileor the fixture are unavailable, and skips vacuously if the fixture is somehow not a NoData profile.Verification
<DataColourSpace>NULL</DataColourSpace>, round-trip →4E554C4C)Files
.github/scripts/iccdev-issue-1356-xml-colorspace-null-roundtrip-regression.sh.github/ci/test-data/nodata-colourspace-1356.icc— theLCDDisplayCat8Obs.iccprofile from Research: File LCDDisplayCat8Obs.icc #1355 (data colour space0x00000000)Build/Cmake/Testing/CMakeLists.txt— CTest registration (iccdev.issue-1356-xml-colorspace-null-roundtrip-regression)🤖 Generated with Claude Code