File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
java/ql/test-kotlin1/library-tests/dataflow/foreach Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,15 @@ class C2 {
1616 sink(s)
1717 }
1818 }
19+
20+ fun test2 () {
21+ val l1 = arrayOf(" " )
22+ val l2 = arrayOf(" " )
23+ l1[0 ] = taint(" a" )
24+ l2.set(0 , taint(" a" ))
25+ sink(l1[0 ])
26+ sink(l2[0 ])
27+ sink(l1.get(0 ))
28+ sink(l2.get(0 ))
29+ }
1930}
Original file line number Diff line number Diff line change 77| C2.kt:8:32:8:32 | "a" | C2.kt:11:14:11:21 | get(...) |
88| C2.kt:8:32:8:32 | "a" | C2.kt:13:18:13:21 | ...[...] |
99| C2.kt:8:32:8:32 | "a" | C2.kt:16:18:16:18 | s |
10+ | C2.kt:23:24:23:24 | "a" | C2.kt:25:14:25:18 | ...[...] |
11+ | C2.kt:23:24:23:24 | "a" | C2.kt:27:14:27:22 | get(...) |
12+ | C2.kt:24:26:24:26 | "a" | C2.kt:26:14:26:18 | ...[...] |
13+ | C2.kt:24:26:24:26 | "a" | C2.kt:28:14:28:22 | get(...) |
You can’t perform that action at this time.
0 commit comments