File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
cpp/ql/test/library-tests/dataflow/taint-tests Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -6629,6 +6629,19 @@ WARNING: Module TaintTracking has been deprecated and may be removed in future (
6629
6629
| taint.cpp:720:27:720:32 | source | taint.cpp:720:20:720:25 | call to strtok | TAINT |
6630
6630
| taint.cpp:721:8:721:16 | tokenized | taint.cpp:721:7:721:16 | * ... | TAINT |
6631
6631
| taint.cpp:722:8:722:12 | delim | taint.cpp:722:7:722:12 | * ... | TAINT |
6632
+ | taint.cpp:727:24:727:29 | source | taint.cpp:727:24:727:29 | source | |
6633
+ | taint.cpp:727:24:727:29 | source | taint.cpp:729:18:729:23 | source | |
6634
+ | taint.cpp:728:17:728:23 | 0 | taint.cpp:729:27:729:32 | endptr | |
6635
+ | taint.cpp:728:17:728:23 | 0 | taint.cpp:731:7:731:12 | endptr | |
6636
+ | taint.cpp:728:17:728:23 | 0 | taint.cpp:732:8:732:13 | endptr | |
6637
+ | taint.cpp:729:11:729:16 | call to strtol | taint.cpp:730:7:730:7 | l | |
6638
+ | taint.cpp:729:18:729:23 | source | taint.cpp:729:11:729:16 | call to strtol | TAINT |
6639
+ | taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:729:27:729:32 | endptr [inner post update] | |
6640
+ | taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:731:7:731:12 | endptr | |
6641
+ | taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:732:8:732:13 | endptr | |
6642
+ | taint.cpp:729:27:729:32 | endptr | taint.cpp:729:26:729:32 | & ... | |
6643
+ | taint.cpp:731:7:731:12 | ref arg endptr | taint.cpp:732:8:732:13 | endptr | |
6644
+ | taint.cpp:732:8:732:13 | endptr | taint.cpp:732:7:732:13 | * ... | TAINT |
6632
6645
| vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | |
6633
6646
| vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | |
6634
6647
| vector.cpp:17:21:17:33 | call to vector | vector.cpp:19:14:19:14 | v | |
Original file line number Diff line number Diff line change @@ -720,4 +720,14 @@ void test_strtok_indirect() {
720
720
char * tokenized = strtok (source, delim);
721
721
sink (*tokenized); // $ ir MISSING: ast
722
722
sink (*delim);
723
+ }
724
+
725
+ long int strtol (const char *, char **, int );
726
+
727
+ void test_strtol (char *source) {
728
+ char * endptr = nullptr ;
729
+ long l = strtol (source, &endptr, 10 );
730
+ sink (l); // $ ast,ir
731
+ sink (endptr); // $ MISSING: ast,ir
732
+ sink (*endptr); // $ MISSING: ast,ir
723
733
}
You can’t perform that action at this time.
0 commit comments