mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
C++: Restore some of the lost test results by doing operand -> instruction taint steps in IR TaintTracking.
This commit is contained in:
@@ -13,8 +13,8 @@ int main() {
|
||||
|
||||
|
||||
|
||||
sink(_strdup(getenv("VAR"))); // $ MISSING: ast,ir
|
||||
sink(strdup(getenv("VAR"))); // $ ast MISSING: ir
|
||||
sink(_strdup(getenv("VAR"))); // $ ir MISSING: ast
|
||||
sink(strdup(getenv("VAR"))); // $ ast,ir
|
||||
sink(unmodeled_function(getenv("VAR"))); // clean by assumption
|
||||
|
||||
char untainted_buf[100] = "";
|
||||
|
||||
@@ -369,9 +369,9 @@ void test_strdup(char *source)
|
||||
a = strdup(source);
|
||||
b = strdup("hello, world");
|
||||
c = strndup(source, 100);
|
||||
sink(a); // $ ast MISSING: ir
|
||||
sink(a); // $ ast,ir
|
||||
sink(b);
|
||||
sink(c); // $ ast MISSING: ir
|
||||
sink(c); // $ ast,ir
|
||||
}
|
||||
|
||||
void test_strndup(int source)
|
||||
@@ -388,7 +388,7 @@ void test_wcsdup(wchar_t *source)
|
||||
|
||||
a = wcsdup(source);
|
||||
b = wcsdup(L"hello, world");
|
||||
sink(a); // $ ast MISSING: ir
|
||||
sink(a); // $ ast,ir
|
||||
sink(b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user