diff --git a/soot-infoflow/test/soot/jimple/infoflow/test/HeapTestCode.java b/soot-infoflow/test/soot/jimple/infoflow/test/HeapTestCode.java index 43642d6a6..d117b07aa 100644 --- a/soot-infoflow/test/soot/jimple/infoflow/test/HeapTestCode.java +++ b/soot-infoflow/test/soot/jimple/infoflow/test/HeapTestCode.java @@ -1403,5 +1403,29 @@ public void delayedReturnTest1() { private void doAlias(B b, A a) { b.attr = a; } + + + class D { + E e; + + public void read() { + e = new E(); + e.read(); + } + } + + class E { + String str; + public void read() { + str = ""; + str = str + TelephonyManager.getDeviceId(); + } + } + public void aliasWithOverwriteTest1() { + D d = new D(); + d.read(); + ConnectionManager cm = new ConnectionManager(); + cm.publish(d.e.str); + } } diff --git a/soot-infoflow/test/soot/jimple/infoflow/test/junit/HeapTests.java b/soot-infoflow/test/soot/jimple/infoflow/test/junit/HeapTests.java index 3f6d02aca..6fd1a4d1d 100644 --- a/soot-infoflow/test/soot/jimple/infoflow/test/junit/HeapTests.java +++ b/soot-infoflow/test/soot/jimple/infoflow/test/junit/HeapTests.java @@ -1106,4 +1106,12 @@ public void delayedReturnTest1() { checkInfoflow(infoflow, 1); } + @Test(timeout = 300000) + public void aliasWithOverwriteTest1() { + IInfoflow infoflow = initInfoflow(); + List epoints = new ArrayList(); + epoints.add(""); + infoflow.computeInfoflow(appPath, libPath, epoints, sources, sinks); + checkInfoflow(infoflow, 1); + } }