mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Add files via upload
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| test.c:12:9:12:16 | intIndex | A variable with this name is used in the loop condition. |
|
||||
@@ -0,0 +1 @@
|
||||
experimental/Security/CWE/CWE-1126/DeclarationOfVariableWithUnnecessarilyWideScope.ql
|
||||
@@ -0,0 +1,15 @@
|
||||
void workFunction_0(char *s) {
|
||||
int intIndex = 10;
|
||||
char buf[80];
|
||||
while(intIndex > 2) // GOOD
|
||||
{
|
||||
buf[intIndex] = 1;
|
||||
intIndex--;
|
||||
}
|
||||
while(intIndex > 2)
|
||||
{
|
||||
buf[intIndex] = 1;
|
||||
int intIndex; // BAD
|
||||
intIndex--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user