Skip to content

Commit dc2152c

Browse files
authored
Added a failed false negative test case (#1)
* Added a failed false negative test case
1 parent 18d145d commit dc2152c

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

soot-infoflow/test/soot/jimple/infoflow/test/HeapTestCode.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,5 +1403,29 @@ public void delayedReturnTest1() {
14031403
private void doAlias(B b, A a) {
14041404
b.attr = a;
14051405
}
1406+
1407+
1408+
class D {
1409+
E e;
1410+
1411+
public void read() {
1412+
e = new E();
1413+
e.read();
1414+
}
1415+
}
1416+
1417+
class E {
1418+
String str;
1419+
public void read() {
1420+
str = "";
1421+
str = str + TelephonyManager.getDeviceId();
1422+
}
1423+
}
1424+
public void aliasWithOverwriteTest1() {
1425+
D d = new D();
1426+
d.read();
1427+
ConnectionManager cm = new ConnectionManager();
1428+
cm.publish(d.e.str);
1429+
}
14061430

14071431
}

soot-infoflow/test/soot/jimple/infoflow/test/junit/HeapTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,4 +1106,12 @@ public void delayedReturnTest1() {
11061106
checkInfoflow(infoflow, 1);
11071107
}
11081108

1109+
@Test(timeout = 300000)
1110+
public void aliasWithOverwriteTest1() {
1111+
IInfoflow infoflow = initInfoflow();
1112+
List<String> epoints = new ArrayList<String>();
1113+
epoints.add("<soot.jimple.infoflow.test.HeapTestCode: void aliasWithOverwriteTest1()>");
1114+
infoflow.computeInfoflow(appPath, libPath, epoints, sources, sinks);
1115+
checkInfoflow(infoflow, 1);
1116+
}
11091117
}

0 commit comments

Comments
 (0)