Skip to content

Fix: NPD in CIccTagXmlStruct::ParseTag()#639

Merged
xsscx merged 1 commit intomasterfrom
issue-633
Mar 1, 2026
Merged

Fix: NPD in CIccTagXmlStruct::ParseTag()#639
xsscx merged 1 commit intomasterfrom
issue-633

Conversation

@ChrisCoxArt
Copy link
Contributor

Fixes #633

Pull Request Checklist

  • Have you followed the guidelines in Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you built your Pull Request locally with the Build Instructions?
  • Have you added or updated relevant tests?
  • Have you added or updated relevant docs?

@ChrisCoxArt ChrisCoxArt requested a review from xsscx as a code owner March 1, 2026 03:14
@xsscx xsscx self-assigned this Mar 1, 2026
@xsscx xsscx added PR Pull Request Review in Process Issue is being Reviewed by Maintainers Pending Merge Maintainer indicates Merge Pending and requests no further changes and removed Review in Process Issue is being Reviewed by Maintainers pending labels Mar 1, 2026
Copy link
Member

@xsscx xsscx left a comment

Choose a reason for hiding this comment

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

Maintainer Review

2026-03-01 03:18:38 UTC

mkdir pr-639
cd pr-639
git clone https://github.com/InternationalColorConsortium/iccDEV.git
cd iccDEV
git fetch origin pull/639/head:pr-639
git checkout pr-639
cd Build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -Wno-dev -DCMAKE_CXX_FLAGS="-g -fsanitize=address,undefined -fno-sanitize=leak -fno-omit-frame-pointer -Wall" -DENABLE_TOOLS=ON -DENABLE_STATIC_LIBS=ON -DENABLE_SHARED_LIBS=ON Cmake > cmake.log 2>&1
make -j32
wget https://github.com/xsscx/fuzz/raw/refs/heads/master/xml/icc/segv-CIccTagXmlStruct-ParseTag-IccTagXml_cpp-Line4738.xml
ASAN_OPTIONS=detect_leaks=0,print_scariness=1  iccFromXml segv-CIccTagXmlStruct-ParseTag-IccTagXml_cpp-Line4738.xml foo.bar

Expected Output

ASAN_OPTIONS=detect_leaks=0,print_scariness=1 Tools/IccFromXml/iccFromXml segv-CIccTagXmlStruct-ParseTag-IccTagXml_cpp-Line4738.xml foo.bar
Profile parsed.  Profile is invalid, but saved correctly
Error! -  - Unknown 'c%eN' = 6325654E: Unknown profile class!
Error! - Both Colorimetric PCS or Spectral PCS are not defined!
Warning! - Header date - 0: Invalid year!
Warning! - Header date - 0: Invalid month!
Warning! - Header date - 0: Invalid day!
NonCompliant! - Required tags missing.
Error! - Unknown Profile Class.

@xsscx xsscx changed the title check that the children pointer exists before dereferencing it Fix: NPD in CIccTagXmlStruct::ParseTag() Mar 1, 2026
@xsscx xsscx merged commit 48c19d9 into master Mar 1, 2026
27 checks passed
@xsscx xsscx added Merged Merged and removed Pending Merge Maintainer indicates Merge Pending and requests no further changes labels Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged Merged PR Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPD in CIccTagXmlStruct::ParseTag() at IccTagXml.cpp:4738

2 participants