mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C++: Add a test that fails because of a non-terminating test that dominates this one.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
edges
|
||||
subpaths
|
||||
nodes
|
||||
subpaths
|
||||
#select
|
||||
|
||||
@@ -608,6 +608,13 @@ int test23() {
|
||||
return sizeof(buffer) / sizeof(buffer[101]); // GOOD
|
||||
}
|
||||
|
||||
char* strcpy(char *, const char *);
|
||||
|
||||
void test24(char* source) {
|
||||
char buffer[100];
|
||||
strcpy(buffer, source); // BAD
|
||||
}
|
||||
|
||||
int tests_main(int argc, char *argv[])
|
||||
{
|
||||
long long arr17[19];
|
||||
@@ -633,6 +640,7 @@ int tests_main(int argc, char *argv[])
|
||||
test21(argc == 0);
|
||||
test22(argc == 0, argv[0]);
|
||||
test23();
|
||||
test24(argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user