Skip to content

Commit 2c2ab2c

Browse files
committed
hopefully fixed the false negative from #414, and added more test cases
1 parent dc2152c commit 2c2ab2c

File tree

3 files changed

+417
-319
lines changed

3 files changed

+417
-319
lines changed

soot-infoflow/src/soot/jimple/infoflow/problems/BackwardsInfoflowProblem.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,16 @@ private Set<Abstraction> computeAliases(final DefinitionStmt defStmt, Value left
148148
// Is the left side overwritten completely?
149149
if (leftSideMatches) {
150150
// Termination shortcut: If the right side is a value we do
151-
// not track,
152-
// we can stop here.
153-
if (!(rightValue instanceof Local || rightValue instanceof FieldRef))
154-
return null;
151+
// not track, we can stop here.
152+
if (!(rightValue instanceof Local || rightValue instanceof FieldRef)) {
153+
res.add(source);
154+
return res;
155+
}
155156
}
156157

157158
// If we assign a constant, there is no need to track the right
158-
// side
159-
// any further or do any forward propagation since constants
160-
// cannot
161-
// carry taint.
159+
// side any further or do any forward propagation since constants
160+
// cannot carry taint.
162161
if (rightValue instanceof Constant)
163162
return res;
164163

0 commit comments

Comments
 (0)