Conversation
And compare that to the op count before adding so we don't overflow 32 bits. Fixes #669
xsscx
approved these changes
Mar 15, 2026
Member
xsscx
left a comment
There was a problem hiding this comment.
Maintainer Review
2026-03-15 00:32:50 UTC
Repro
mkdir pr-684
cd pr-684
git clone https://github.com/InternationalColorConsortium/iccDEV.git
cd iccDEV/Build
git fetch origin pull/684/head:pr-684
git checkout pr-684
export CXX=clang++ && export CXXFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1 -fprofile-arcs -ftest-coverage" && export LDFLAGS="-fsanitize=address,undefined -fprofile-arcs" && cmake Cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DENABLE_COVERAGE=ON
make -j$(nproc)
cd ../Testing/
echo "=== Updating PATH ==="
for d in ../Build/Tools/*; do
[ -d "$d" ] && export PATH="$(realpath "$d"):$PATH"
done
wget https://github.com/xsscx/research/raw/refs/heads/main/test-profiles/ios-gen-p3-1x1.tif
wget https://github.com/xsscx/fuzz/raw/refs/heads/master/graphics/icc/so-CIccCalculatorFunc-CheckUnderflowOverflow-IccMpeCalc_cpp-Line4152.icc
iccApplyProfiles ios-gen-p3-1x1.tif /dev/null 0 0 0 0 0 so-CIccCalculatorFunc-CheckUnderflowOverflow-IccMpeCalc_cpp-Line4152.icc 0
PR Appliction Output
Error 3 - Unable to begin profile application - Possibly invalid or incompatible profiles
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.
And compare that to the op count before adding so we don't overflow 32 bits. Fixes #669
Pull Request Checklist