Skip to content

Commit 74ac234

Browse files
author
Benjamin Muskalla
committed
Restrict field access to same type
1 parent 8740e87 commit 74ac234

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ string captureQualifierFlow(Callable api) {
6464
string captureFieldFlow(Callable api) {
6565
exists(FieldAccess fa, ReturnNodeExt returnNode |
6666
not (fa.getField().isStatic() and fa.getField().isFinal()) and
67+
fa.getField().getDeclaringType() = api.getDeclaringType() and
6768
returnNode.getEnclosingCallable() = api and
68-
fa.getCompilationUnit() = api.getCompilationUnit() and
6969
isRelevantType(api.getReturnType()) and
7070
not api.getDeclaringType() instanceof EnumType and
7171
TaintTracking::localTaint(DataFlow::exprNode(fa), returnNode)

0 commit comments

Comments
 (0)