зеркало из https://github.com/github/codeql.git
C++: Demonstrate ArrayExpr FP
This commit is contained in:
Родитель
88a39d9454
Коммит
e99c68885c
|
@ -18,3 +18,4 @@
|
|||
| test.cpp:85:12:85:16 | hello | The format string argument to printf should be constant to prevent security issues and other potential errors. |
|
||||
| test.cpp:90:12:90:18 | ++ ... | The format string argument to printf should be constant to prevent security issues and other potential errors. |
|
||||
| test.cpp:107:12:107:24 | new[] | The format string argument to printf should be constant to prevent security issues and other potential errors. |
|
||||
| test.cpp:142:10:142:20 | access to array | The format string argument to printf should be constant to prevent security issues and other potential errors. |
|
||||
|
|
|
@ -133,3 +133,11 @@ void another_func(void) {
|
|||
printf("Hello, World\n"); // GOOD
|
||||
printf(gettext("Hello, World\n")); // GOOD
|
||||
}
|
||||
|
||||
void set_value_of(int *i);
|
||||
|
||||
void print_ith_message() {
|
||||
int i;
|
||||
set_value_of(&i);
|
||||
printf(messages[i], 1U); // GOOD [FALSE POSITIVE]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче