Skip to content

Commit ba822f8

Browse files
committed
Keep incoming parameter alive in EasyTaintWrapper
1 parent ecf09a4 commit ba822f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

soot-infoflow/src/soot/jimple/infoflow/taintWrappers/EasyTaintWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,6 @@ public Set<AccessPath> getInverseTaintsForMethodInternal(Stmt stmt, Abstraction
354354
if (wrapType == MethodWrapType.KillTaint)
355355
return Collections.emptySet();
356356

357-
// If the base was tainted, one parameter could be responsible for this but we don't know,
358-
// maybe it also was tainted before. So we have to keep it.
359-
taints.add(taintedPath);
360-
361357
if (wrapType == MethodWrapType.CreateTaint && taintedAbs.getDominator() != null
362358
&& taintedAbs.getDominator() != null)
363359
taints.add(AccessPath.getEmptyAccessPath());
@@ -376,6 +372,10 @@ public Set<AccessPath> getInverseTaintsForMethodInternal(Stmt stmt, Abstraction
376372
}
377373
}
378374

375+
// Keep the incoming taint if it is not the lhs
376+
if (!taintedObj)
377+
taints.add(taintedPath);
378+
379379
// if base object is tainted, we need to taint all parameters
380380
if (isSupported && wrapType == MethodWrapType.CreateTaint) {
381381
// If we are inside a conditional, we always taint

0 commit comments

Comments
 (0)