mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
10 lines
276 B
C++
10 lines
276 B
C++
Record records[SIZE] = ...;
|
|
|
|
int f() {
|
|
int recordIdx = 0;
|
|
recordIdx = readUserInput(); //recordIdx is returned from a function
|
|
// there is no check so it could be negative
|
|
doFoo(&(records[recordIdx])); //but is not checked before use as an array offset
|
|
}
|
|
|