File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
cpp/ql/test/library-tests/dataflow/taint-tests Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6622,6 +6622,13 @@ WARNING: Module TaintTracking has been deprecated and may be removed in future (
6622
6622
| taint.cpp:711:13:711:13 | s | taint.cpp:711:2:711:8 | call to strncpy | TAINT |
6623
6623
| taint.cpp:711:13:711:13 | s | taint.cpp:711:10:711:10 | ref arg d | TAINT |
6624
6624
| taint.cpp:712:7:712:7 | ref arg d | taint.cpp:709:25:709:25 | d | |
6625
+ | taint.cpp:718:17:718:31 | call to indirect_source | taint.cpp:720:27:720:32 | source | |
6626
+ | taint.cpp:719:22:719:29 | ,.-;:_ | taint.cpp:720:35:720:39 | delim | |
6627
+ | taint.cpp:719:22:719:29 | ,.-;:_ | taint.cpp:722:8:722:12 | delim | |
6628
+ | taint.cpp:720:20:720:25 | call to strtok | taint.cpp:721:8:721:16 | tokenized | |
6629
+ | taint.cpp:720:27:720:32 | source | taint.cpp:720:20:720:25 | call to strtok | TAINT |
6630
+ | taint.cpp:721:8:721:16 | tokenized | taint.cpp:721:7:721:16 | * ... | TAINT |
6631
+ | taint.cpp:722:8:722:12 | delim | taint.cpp:722:7:722:12 | * ... | TAINT |
6625
6632
| vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | |
6626
6633
| vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | |
6627
6634
| 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 @@ -710,4 +710,14 @@ void test_strncpy(char* d, char* s) {
710
710
argument_source (s);
711
711
strncpy (d, s, 16 );
712
712
sink (d); // $ ast ir
713
+ }
714
+
715
+ char * indirect_source ();
716
+
717
+ void test_strtok_indirect () {
718
+ char *source = indirect_source ();
719
+ const char * delim = " ,.-;:_" ;
720
+ char * tokenized = strtok (source, delim);
721
+ sink (*tokenized); // $ MISSING: ast,ir
722
+ sink (*delim);
713
723
}
You can’t perform that action at this time.
0 commit comments