mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
26 lines
594 B
Java
26 lines
594 B
Java
import android.app.Activity;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
|
|
public class TestStartActivityToGetIntent {
|
|
|
|
static Object source() {
|
|
return null;
|
|
}
|
|
|
|
static void sink(Object sink) {}
|
|
|
|
public void test(Context ctx) {
|
|
Intent intent = new Intent(null, SomeActivity.class);
|
|
intent.putExtra("data", (String) source());
|
|
ctx.startActivity(intent);
|
|
}
|
|
|
|
static class SomeActivity extends Activity {
|
|
|
|
public void test() {
|
|
sink(getIntent().getStringExtra("data")); // $ hasValueFlow
|
|
}
|
|
}
|
|
}
|