CXX.ARRAY_INDEX.WITHOUT_CHECK
The use of n as an array index should only be done within an if statement that checks limits.
To avoid array buffer overruns, it is prudent to ensure that any array index expressions are encapsulated within an if statement checking the index expression is within limits.
Vulnerability and risk
Array access violations are a common source of security vulnerabilities in embedded systems in particular.
Vulnerable code example 1
Copy
array[n] = x;