mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
C++: Add a test of append with CharT.
This commit is contained in:
@@ -366,4 +366,12 @@ void test_string_append() {
|
||||
s9.append(" ");
|
||||
sink(s9); // tainted
|
||||
}
|
||||
|
||||
{
|
||||
std::string s10("abc");
|
||||
char c = ns_char::source();
|
||||
|
||||
s10.append(1, c);
|
||||
sink(s10); // tainted [NOT DETECTED]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user