Skip to content

Commit 57ae1e9

Browse files
committed
C++: Add a testcase that started to fail in github#13326.
1 parent 357542a commit 57ae1e9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6584,6 +6584,13 @@
65846584
| taint.cpp:691:18:691:18 | s [post update] | taint.cpp:695:7:695:7 | s | |
65856585
| taint.cpp:691:20:691:20 | ref arg x | taint.cpp:694:9:694:9 | x | |
65866586
| taint.cpp:694:7:694:7 | s [post update] | taint.cpp:695:7:695:7 | s | |
6587+
| taint.cpp:700:13:700:18 | call to source | taint.cpp:702:11:702:11 | s | |
6588+
| taint.cpp:701:9:701:9 | p | taint.cpp:702:4:702:4 | p | |
6589+
| taint.cpp:702:4:702:4 | p | taint.cpp:702:4:702:6 | ... ++ | |
6590+
| taint.cpp:702:4:702:6 | ... ++ | taint.cpp:702:3:702:6 | * ... | TAINT |
6591+
| taint.cpp:702:4:702:6 | ... ++ | taint.cpp:703:8:703:8 | p | TAINT |
6592+
| taint.cpp:702:10:702:11 | * ... | taint.cpp:702:3:702:11 | ... = ... | |
6593+
| taint.cpp:702:11:702:11 | s | taint.cpp:702:10:702:11 | * ... | TAINT |
65876594
| vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | |
65886595
| vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | |
65896596
| vector.cpp:17:21:17:33 | call to vector | vector.cpp:19:14:19:14 | v | |

cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,4 +693,13 @@ void test_argument_source_field_to_obj() {
693693
sink(s); // $ SPURIOUS: ast,ir
694694
sink(s.x); // $ ast,ir
695695
sink(s.y); // clean
696+
}
697+
698+
namespace strings {
699+
void test_write_to_read_then_incr_then_deref() {
700+
char* s = source();
701+
char* p;
702+
*p++ = *s;
703+
sink(p); // $ ast ir
704+
}
696705
}

0 commit comments

Comments
 (0)