Skip to content

Commit a808fde

Browse files
committed
unified: Associate CFG nodes with implicit getter/setter arguments
1 parent 4bd9473 commit a808fde

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/dataflow/DataFlowNode.qll‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,20 @@ class BuilderNode extends TDataFlowNodeStage1 {
353353
cfgNode.injects(callable.asSourceCallable())
354354
)
355355
or
356-
exists(DataFlowCall call, CallExpr sourceCall, boolean isPost |
357-
call.asExplicitCall() = sourceCall and
358-
this.isImplicitArgument(call, _, isPost) and
356+
exists(DataFlowCall call, Expr access, boolean isPost |
357+
this.isImplicitArgument(call, _, isPost)
358+
|
359359
(
360-
isPost = false and cfgNode.injects(sourceCall)
360+
access = call.asExplicitCall()
361361
or
362-
isPost = true and cfgNode.isAfter(sourceCall)
362+
access = call.asGetterCall()
363+
or
364+
access = call.asSetterCall()
365+
) and
366+
(
367+
isPost = false and cfgNode.injects(access)
368+
or
369+
isPost = true and cfgNode.isAfter(access)
363370
)
364371
)
365372
)

0 commit comments

Comments
 (0)