Skip to content

Fix issue 13254: FN: containerOutOfBounds (std::equal)#8695

Merged
chrchr-github merged 13 commits into
cppcheck-opensource:mainfrom
pfultz2:check-algo-out-of-bounds
Jul 13, 2026
Merged

Fix issue 13254: FN: containerOutOfBounds (std::equal)#8695
chrchr-github merged 13 commits into
cppcheck-opensource:mainfrom
pfultz2:check-algo-out-of-bounds

Conversation

@pfultz2

@pfultz2 pfultz2 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This adds a new check algorithmOutOfBounds that checks when one of the algorithms will access elements out of bounds based on the sizes of other containers passed in. Right now, it directly checks for the stl algorithms, but we could add attributes to the Library to better describe these algorithms so it can be used for other algorithm libraries.

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would like to have an entry in releasenotes.

I would also encourage to add a file here:
https://github.com/cppcheck-opensource/cppcheck/tree/main/man/checkers
Ideally I would like that we document all our warnings and checkers there..

@chrchr-github chrchr-github merged commit 3d88880 into cppcheck-opensource:main Jul 13, 2026
70 checks passed
@pfultz2 pfultz2 deleted the check-algo-out-of-bounds branch July 13, 2026 08:40
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