mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
This is disabled for now because Kotlin doesn't extract java.lang.CharSequence.toString, even though that interface redeclares toString, and JDK18 points a call (syntactically to Editable.toString) that previous JDKs pointed at Object.toString. This produces a database inconsistency that should be fixed Kotlin-side.
17 lines
318 B
Plaintext
17 lines
318 B
Plaintext
import android.text.Editable
|
|
|
|
class TestWidgetKt {
|
|
|
|
fun source() : Editable? { return null }
|
|
fun sink(sink : String) {}
|
|
|
|
fun test() {
|
|
val t = source()
|
|
sink(t.toString()); // $ hasTaintFlow
|
|
|
|
val t2 : Any? = source()
|
|
sink(t2.toString()); // $ MISSING: hasTaintFlow
|
|
}
|
|
}
|
|
|