We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ada999 commit 70a296bCopy full SHA for 70a296b
3 files changed
rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected
rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.ql
@@ -0,0 +1,4 @@
1
+import codeql.rust.dataflow.DataFlow
2
+import codeql.rust.dataflow.internal.TaintTrackingImpl
3
+
4
+query predicate additionalTaintStep = RustTaintTracking::defaultAdditionalTaintStep/3;
rust/ql/test/library-tests/dataflow/taint/main.rs
@@ -24,8 +24,27 @@ fn cast() {
24
sink(b as i64); // $ MISSING: hasTaintFlow=77
25
}
26
27
+mod string {
28
+ fn source(i: i64) -> String {
29
+ format!("{}", i)
30
+ }
31
32
+ fn sink(s: &str) {
33
+ println!("{}", s);
34
35
36
+ pub fn string_slice() {
37
+ let s = source(35);
38
+ let sliced = &s[1..3];
39
+ sink(sliced); // $ MISSING: hasTaintFlow=35
40
41
+}
42
43
+use string::*;
44
45
fn main() {
46
addition();
47
negation();
48
cast();
49
+ string_slice();
50
0 commit comments