Add test and check for another edge case

This commit is contained in:
Tony Torralba
2021-08-26 13:51:06 +02:00
parent bc6c13be69
commit e7983fb269
2 changed files with 6 additions and 0 deletions

View File

@@ -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
)
}

View File

@@ -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");