Skip to content

Add cppcheck suppressions for history read#76

Merged
NathanNeurotic merged 1 commit into
mainfrom
codex/add-cppcheck-suppressions-for-read
Jan 6, 2026
Merged

Add cppcheck suppressions for history read#76
NathanNeurotic merged 1 commit into
mainfrom
codex/add-cppcheck-suppressions-for-read

Conversation

@NathanNeurotic

Copy link
Copy Markdown
Owner

Motivation

  • Silence a known false-positive from Codacy/Cppcheck/Flawfinder for a bounded read in the history loader.
  • The read is single-shot into a fixed-size buffer and the return value is checked, so no overflow is possible.
  • Avoid changing program logic, error handling, or adding global suppressions.

Description

  • Inserted two line-scoped cppcheck suppressions immediately above the flagged read call in src/OSDHistory.c.
  • The exact inserted lines are: // cppcheck-suppress readBufferSize and // cppcheck-suppress bufferAccessOutOfBounds.
  • Only src/OSDHistory.c was modified and no functional code or control flow was changed.

Testing

  • No automated tests were run on this change.
  • The change is comment-only and should not affect runtime behavior or existing tests.
  • The file was committed locally with the update to src/OSDHistory.c.

Codex Task

@NathanNeurotic NathanNeurotic merged commit 2b8749f into main Jan 6, 2026
2 of 3 checks passed
@codacy-production

Copy link
Copy Markdown

Codacy's Analysis Summary

0 new issue (≤ 0 issue)
0 new security issue

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant