mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
C++: Add wrong format type builtin function test
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| tests.c:3:74:3:74 | 1 | This format specifier for type 'char *' does not match the argument type 'int'. |
|
||||
@@ -0,0 +1 @@
|
||||
Likely Bugs/Format/WrongTypeFormatArguments.ql
|
||||
@@ -0,0 +1,5 @@
|
||||
void f() {
|
||||
char buf[35];
|
||||
__builtin___sprintf_chk(buf, 0, __builtin_object_size(buf, 1), "%s", 1);
|
||||
__builtin___sprintf_chk(buf, 0, __builtin_object_size(buf, 1), "%d", 1);
|
||||
}
|
||||
Reference in New Issue
Block a user