From f17518ace21eb2cafa6e2a3bda002f0bb1ad5e04 Mon Sep 17 00:00:00 2001 From: Asger F Date: Thu, 24 Aug 2023 13:12:43 +0200 Subject: [PATCH] Java: update to reflect changes in VariableCapture.qll --- .../code/java/dataflow/internal/DataFlowPrivate.qll | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll index 212232e077a..7350e2acf75 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll @@ -114,9 +114,9 @@ private module CaptureInput implements VariableCapture::InputSig { CapturedVariable getVariable() { result = v } - Expr getSource() { - result = this.(VariableAssign).getSource() or - result = this.(AssignOp) + Node getSource() { + result.asExpr() = this.(VariableAssign).getSource() or + result.asExpr() = this.(AssignOp) } } @@ -162,7 +162,8 @@ private CaptureFlow::ClosureNode asClosureNode(Node n) { result.(CaptureFlow::ParameterNode).getParameter() = n.asParameter() or result.(CaptureFlow::ThisParameterNode).getCallable() = n.(InstanceParameterNode).getCallable() or exprNode(result.(CaptureFlow::MallocNode).getClosureExpr()).(PostUpdateNode).getPreUpdateNode() = - n + n or + result.(CaptureFlow::VariableWriteSourceNode).getVariableWrite().getSource() = n } private predicate captureStoreStep(Node node1, CapturedVariableContent c, Node node2) {