Files
codeql/java/ql/test-kotlin1/library-tests/dataflow/whenexpr/WhenExpr.kt
2023-11-21 15:28:12 +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"
}