Skip to content

Commit 686f924

Browse files
committed
Only query taint wrappers on calls
1 parent 8630452 commit 686f924

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

soot-infoflow/src/soot/jimple/infoflow/problems/rules/backward/BackwardsSinkPropagationRule.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ private Collection<Abstraction> propagate(Abstraction source, Stmt stmt, ByRefer
4747
// Do not introduce taints inside exclusive methods
4848
Optional<Unit> caller = manager.getICFG().getCallersOf(manager.getICFG().getMethodOf(stmt)).stream()
4949
.findAny();
50-
if (caller.isPresent() && manager.getTaintWrapper() != null
51-
&& manager.getTaintWrapper().isExclusive((Stmt) caller.get(), zeroValue))
52-
return null;
50+
if (caller.isPresent()) {
51+
Stmt callerStmt = (Stmt) caller.get();
52+
if (callerStmt.containsInvokeExpr() && manager.getTaintWrapper() != null
53+
&& manager.getTaintWrapper().isExclusive(callerStmt, zeroValue))
54+
return null;
55+
}
5356

5457
Set<Abstraction> res = new HashSet<>();
5558
for (AccessPath ap : sinkInfo.getAccessPaths()) {

0 commit comments

Comments
 (0)