[high] cppcheck: Array 'readings[8]' accessed at index 8, which is out of bounds. #842

Closed
opened 2026-11-04 16:32:32 +00:00 by pruefwerk · 1 comment
Member

high Finding

Scanner: cppcheck
Severity: high
Rule: arrayIndexOutOfBounds
CWE: CWE-788
CRA: cra-ai-20 — Automatisierte Sicherheitstests (Annex I)

Description

Array 'readings[8]' accessed at index 8, which is out of bounds.

Location

File: fixtures/nightly/firmware/c-sensor-node/Core/Src/sensors.c (line 15)

Code

        readings[i] = i * 10;

Remediation

Exclude fixtures/nightly from production cppcheck triage.


Fingerprint: f07ffd6f597b198b10794427665ad1a3a077a64bef016b1276e02fe8640ef2db
Generated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen

## high Finding **Scanner:** cppcheck **Severity:** high **Rule:** arrayIndexOutOfBounds **CWE:** CWE-788 **CRA:** cra-ai-20 — Automatisierte Sicherheitstests (Annex I) ### Description Array 'readings[8]' accessed at index 8, which is out of bounds. ### Location **File:** `fixtures/nightly/firmware/c-sensor-node/Core/Src/sensors.c` (line 15) ### Code ``` readings[i] = i * 10; ``` ### Remediation Exclude fixtures/nightly from production cppcheck triage. --- *Fingerprint:* `f07ffd6f597b198b10794427665ad1a3a077a64bef016b1276e02fe8640ef2db` *Generated by compliance-scanner* [Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
pruefwerk added the cra:annex-ipruefwerkseverity:high labels 2026-11-04 16:32:32 +00:00
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#842