Files
codeql/java/ql/test-kotlin2/library-tests/dataflow/whenexpr/WhenExpr.kt
2023-11-17 14:07:13 +00:00

15 lines
225 B
Kotlin

class WhenExpr {
fun taint() = Uri()
fun sink(s: String?) { }
fun bad(b: Boolean) {
val s0 = if (b) taint() else null
sink(s0?.getQueryParameter())
}
}
class Uri {
fun getQueryParameter() = "tainted"
}