Skip to content

Commit 6c12d2a

Browse files
committed
Anaylsis Scope is now explicitly asking for method signature from invoke expressions.
1 parent 58c32d9 commit 6c12d2a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

de.fraunhofer.iem.secucheck.analysis/src/main/java/de/fraunhofer/iem/secucheck/analysis/internal/SingleFlowAnalysisScope.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ protected Collection<? extends Query> generate(Edge cfgEdge) {
6060

6161
// Find source methods.
6262
for (Method flowMethod : this.taintFlow.getFrom()) {
63-
if (ToStringEquals(statement.getMethod(),
64-
WrapInAngularBrackets(flowMethod.getSignature()))) {
63+
if (toStringEquals(statement.getMethod(),
64+
wrapInAngularBrackets(flowMethod.getSignature()))) {
6565
sourceMethods.add(statement.getMethod());
6666
}
6767
}
6868

6969
// Find target methods.
7070
for (Method flowMethod : this.taintFlow.getTo()) {
71-
if (ToStringEquals(statement.getMethod(),
72-
WrapInAngularBrackets(flowMethod.getSignature()))) {
71+
if (toStringEquals(statement.getMethod(),
72+
wrapInAngularBrackets(flowMethod.getSignature()))) {
7373
sinkMethods.add(statement.getMethod());
7474
}
7575
}
@@ -82,10 +82,10 @@ private Collection<Val> generateSourceVariables(TaintFlowQuery partialFlow,
8282

8383
for (Method sourceMethod : partialFlow.getFrom()) {
8484

85-
String sourceSootSignature = WrapInAngularBrackets(sourceMethod.getSignature());
85+
String sourceSootSignature = wrapInAngularBrackets(sourceMethod.getSignature());
8686
Collection<Val> out = Sets.newHashSet();
8787

88-
if (ToStringEquals(statement.getMethod(), sourceSootSignature) &&
88+
if (toStringEquals(statement.getMethod(), sourceSootSignature) &&
8989
statement.isIdentityStmt()) {
9090

9191
// Left and Right Op() methods don't work for IdentityStmt inside JimpleStatement.
@@ -119,7 +119,7 @@ private Collection<Val> generateSourceVariables(TaintFlowQuery partialFlow,
119119
return out;
120120

121121
} else if (statement.containsInvokeExpr()
122-
&& ToStringEquals(statement.getInvokeExpr().getMethod(),
122+
&& toStringEquals(statement.getInvokeExpr().getMethod().getSignature(),
123123
sourceSootSignature)) {
124124

125125
// Taint the return value
@@ -158,11 +158,11 @@ private Collection<Val> generatedSinkVariables(TaintFlowQuery partialFlow,
158158

159159
for (Method sinkMethod : partialFlow.getTo()) {
160160

161-
String sinkSootSignature = WrapInAngularBrackets(sinkMethod.getSignature());
161+
String sinkSootSignature = wrapInAngularBrackets(sinkMethod.getSignature());
162162
Collection<Val> out = Sets.newHashSet();
163163

164164
if (statement.containsInvokeExpr() &&
165-
ToStringEquals(statement.getInvokeExpr().getMethod(),
165+
toStringEquals(statement.getInvokeExpr().getMethod().getSignature(),
166166
sinkSootSignature)) {
167167

168168
// Taint the return value.
@@ -190,11 +190,11 @@ private Collection<Val> generatedSinkVariables(TaintFlowQuery partialFlow,
190190
return Collections.emptySet();
191191
}
192192

193-
private static String WrapInAngularBrackets(String value) {
193+
private static String wrapInAngularBrackets(String value) {
194194
return "<" + value + ">";
195195
}
196196

197-
private static boolean ToStringEquals(Object object1, Object object2) {
197+
private static boolean toStringEquals(Object object1, Object object2) {
198198
return object1.toString().equals(object2.toString());
199199
}
200200

0 commit comments

Comments
 (0)