зеркало из https://github.com/github/codeql.git
C++: Extend the taint model and accept test changes.
This commit is contained in:
Родитель
e4683449cb
Коммит
33494fe9e1
|
@ -25,6 +25,9 @@ private class Strtol extends AliasFunction, ArrayFunction, TaintFunction, SideEf
|
|||
input.isParameterDeref(0)
|
||||
) and
|
||||
output.isReturnValue()
|
||||
or
|
||||
input.isParameter(0) and
|
||||
output.isParameterDeref(1)
|
||||
}
|
||||
|
||||
override predicate parameterNeverEscapes(int i) {
|
||||
|
|
|
@ -6636,6 +6636,7 @@ WARNING: Module TaintTracking has been deprecated and may be removed in future (
|
|||
| taint.cpp:728:17:728:23 | 0 | taint.cpp:732:8:732:13 | endptr | |
|
||||
| taint.cpp:729:11:729:16 | call to strtol | taint.cpp:730:7:730:7 | l | |
|
||||
| taint.cpp:729:18:729:23 | source | taint.cpp:729:11:729:16 | call to strtol | TAINT |
|
||||
| taint.cpp:729:18:729:23 | source | taint.cpp:729:26:729:32 | ref arg & ... | TAINT |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:729:27:729:32 | endptr [inner post update] | |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:731:7:731:12 | endptr | |
|
||||
| taint.cpp:729:26:729:32 | ref arg & ... | taint.cpp:732:8:732:13 | endptr | |
|
||||
|
|
|
@ -728,6 +728,6 @@ void test_strtol(char *source) {
|
|||
char* endptr = nullptr;
|
||||
long l = strtol(source, &endptr, 10);
|
||||
sink(l); // $ ast,ir
|
||||
sink(endptr); // $ MISSING: ast,ir
|
||||
sink(*endptr); // $ MISSING: ast,ir
|
||||
sink(endptr); // $ ast,ir
|
||||
sink(*endptr); // $ ast,ir
|
||||
}
|
Загрузка…
Ссылка в новой задаче