Skip to content

Fix 14924: FP containerOutOfBounds (copy accessed in loop)#8740

Open
pfultz2 wants to merge 1 commit into
cppcheck-opensource:mainfrom
pfultz2:valueflow-pm-eval-symbolic-size
Open

Fix 14924: FP containerOutOfBounds (copy accessed in loop)#8740
pfultz2 wants to merge 1 commit into
cppcheck-opensource:mainfrom
pfultz2:valueflow-pm-eval-symbolic-size

Conversation

@pfultz2

@pfultz2 pfultz2 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread lib/programmemory.cpp
ValueFlow::Value v = execute(containerTok);
if (v.isContainerSizeValue())
return v;
for (const ValueFlow::Value& value : containerTok->values()) {
@pfultz2

pfultz2 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@danmar @chrchr-github Any feedback? Or review?

@chrchr-github

Copy link
Copy Markdown
Collaborator

@danmar @chrchr-github Any feedback? Or review?

Just a question: The FP was triggered by 887b5d2, so why is the fix in ProgramMemory, which that commit didn't touch?

@pfultz2

pfultz2 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@danmar @chrchr-github Any feedback? Or review?

Just a question: The FP was triggered by 887b5d2, so why is the fix in ProgramMemory, which that commit didn't touch?

#8669 propagate values further thru more conditions, but we need to improve ProgramMemory to understand the conditions much better in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants