mirror of
https://github.com/github/codeql.git
synced 2026-04-21 06:55:31 +02:00
C++: Add failing test.
This commit is contained in:
@@ -6629,6 +6629,19 @@ WARNING: Module TaintTracking has been deprecated and may be removed in future (
|
||||
| taint.cpp:720:27:720:32 | source | taint.cpp:720:20:720:25 | call to strtok | TAINT |
|
||||
| taint.cpp:721:8:721:16 | tokenized | taint.cpp:721:7:721:16 | * ... | TAINT |
|
||||
| taint.cpp:722:8:722:12 | delim | taint.cpp:722:7:722:12 | * ... | TAINT |
|
||||
| taint.cpp:727:24:727:29 | source | taint.cpp:727:24:727:29 | source | |
|
||||
| taint.cpp:727:24:727:29 | source | taint.cpp:729:18:729:23 | source | |
|
||||
| taint.cpp:728:17:728:23 | 0 | taint.cpp:729:27:729:32 | endptr | |
|
||||
| taint.cpp:728:17:728:23 | 0 | taint.cpp:731:7:731:12 | endptr | |
|
||||
| taint.cpp:728:17:728:23 | 0 | taint.cpp:732:8:732:13 | endptr | |
|
||||
| taint.cpp:729:11:729:16 | call to strtol | taint.cpp:730:7:730:7 | l | |
|
||||
| taint.cpp:729:18:729:23 | source | taint.cpp:729:11:729:16 | call to strtol | TAINT |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:729:27:729:32 | endptr [inner post update] | |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:731:7:731:12 | endptr | |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:732:8:732:13 | endptr | |
|
||||
| taint.cpp:729:27:729:32 | endptr | taint.cpp:729:26:729:32 | & ... | |
|
||||
| taint.cpp:731:7:731:12 | ref arg endptr | taint.cpp:732:8:732:13 | endptr | |
|
||||
| taint.cpp:732:8:732:13 | endptr | taint.cpp:732:7:732:13 | * ... | TAINT |
|
||||
| vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | |
|
||||
| vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | |
|
||||
| vector.cpp:17:21:17:33 | call to vector | vector.cpp:19:14:19:14 | v | |
|
||||
|
||||
@@ -720,4 +720,14 @@ void test_strtok_indirect() {
|
||||
char* tokenized = strtok(source, delim);
|
||||
sink(*tokenized); // $ ir MISSING: ast
|
||||
sink(*delim);
|
||||
}
|
||||
|
||||
long int strtol(const char*, char**, int);
|
||||
|
||||
void test_strtol(char *source) {
|
||||
char* endptr = nullptr;
|
||||
long l = strtol(source, &endptr, 10);
|
||||
sink(l); // $ ast,ir
|
||||
sink(endptr); // $ MISSING: ast,ir
|
||||
sink(*endptr); // $ MISSING: ast,ir
|
||||
}
|
||||
Reference in New Issue
Block a user