Skip to content

Commit a546b38

Browse files
author
Benjamin Muskalla
committed
Restrict field access to corresponding type
1 parent 6960a7b commit a546b38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

java/ql/src/utils/model-generator/CaptureSummaryModels.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class ParameterToFieldConfig extends TaintTracking::Configuration {
9696
override predicate isSink(DataFlow::Node sink) {
9797
exists(FieldAssignment a |
9898
a.getSource() = sink.asExpr() and
99-
a.getDest().(VarAccess).getVariable().getCompilationUnit() =
100-
sink.getEnclosingCallable().getCompilationUnit()
99+
a.getDest().(FieldAccess).getField().getDeclaringType() =
100+
sink.getEnclosingCallable().getDeclaringType()
101101
)
102102
}
103103
}

0 commit comments

Comments
 (0)