Kotlin: Add more taint tests

This commit is contained in:
Ian Lynagh
2023-12-05 14:40:47 +00:00
parent 821b4c727e
commit 124487c57c
2 changed files with 15 additions and 0 deletions

View File

@@ -16,4 +16,15 @@ class C2 {
sink(s)
}
}
fun test2() {
val l1 = arrayOf("")
val l2 = arrayOf("")
l1[0] = taint("a")
l2.set(0, taint("a"))
sink(l1[0])
sink(l2[0])
sink(l1.get(0))
sink(l2.get(0))
}
}

View File

@@ -7,3 +7,7 @@
| C2.kt:8:32:8:32 | "a" | C2.kt:11:14:11:21 | get(...) |
| C2.kt:8:32:8:32 | "a" | C2.kt:13:18:13:21 | ...[...] |
| C2.kt:8:32:8:32 | "a" | C2.kt:16:18:16:18 | s |
| C2.kt:23:24:23:24 | "a" | C2.kt:25:14:25:18 | ...[...] |
| C2.kt:23:24:23:24 | "a" | C2.kt:27:14:27:22 | get(...) |
| C2.kt:24:26:24:26 | "a" | C2.kt:26:14:26:18 | ...[...] |
| C2.kt:24:26:24:26 | "a" | C2.kt:28:14:28:22 | get(...) |