Skip to content

Commit 3c0e7a7

Browse files
committed
C++: Add a test of append with CharT.
1 parent 732a8fa commit 3c0e7a7

File tree

1 file changed

+8
-0
lines changed
  • cpp/ql/test/library-tests/dataflow/taint-tests

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,12 @@ void test_string_append() {
366366
s9.append(" ");
367367
sink(s9); // tainted
368368
}
369+
370+
{
371+
std::string s10("abc");
372+
char c = ns_char::source();
373+
374+
s10.append(1, c);
375+
sink(s10); // tainted [NOT DETECTED]
376+
}
369377
}

0 commit comments

Comments
 (0)