mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
C++: Add cpp/non-constant-format test
This commit is contained in:
@@ -156,3 +156,10 @@ void fmt_via_strcpy(char *data) {
|
||||
strcpy(data, "some string");
|
||||
printf(data); // BAD
|
||||
}
|
||||
|
||||
void fmt_with_assignment() {
|
||||
const char *x, *y;
|
||||
|
||||
x = y = "a";
|
||||
printf(y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user