mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Add test and check for another edge case
This commit is contained in:
@@ -55,6 +55,7 @@ private class SameIntentBeingRelaunchedConfiguration extends DataFlow3::Configur
|
||||
exists(ClassInstanceExpr cie |
|
||||
cie.getConstructedType() instanceof TypeIntent and
|
||||
node1.asExpr() = cie.getArgument(0) and
|
||||
node1.asExpr().getType() instanceof TypeIntent and
|
||||
node2.asExpr() = cie
|
||||
)
|
||||
}
|
||||
|
||||
@@ -146,6 +146,11 @@ public class AndroidIntentRedirectionTest extends Activity {
|
||||
anotherIntent.setComponent(cp);
|
||||
startActivity(originalIntent); // Safe - not a tainted Intent
|
||||
}
|
||||
{
|
||||
Intent originalIntent = getIntent();
|
||||
Intent anotherIntent = new Intent(originalIntent);
|
||||
startActivity(anotherIntent); // Safe - copy constructor from original Intent
|
||||
}
|
||||
{
|
||||
Intent originalIntent = getIntent();
|
||||
Intent fwdIntent = (Intent) originalIntent.getParcelableExtra("forward_intent");
|
||||
|
||||
Reference in New Issue
Block a user