File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
java/ql/lib/semmle/code/java/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,6 @@ private module CaptureInput implements VariableCapture::InputSig {
113113 VariableWrite ( ) { super .getDestVar ( ) = v }
114114
115115 CapturedVariable getVariable ( ) { result = v }
116-
117- Node getSource ( ) {
118- result .asExpr ( ) = this .( VariableAssign ) .getSource ( ) or
119- result .asExpr ( ) = this .( AssignOp )
120- }
121116 }
122117
123118 class VariableRead extends Expr instanceof RValue {
@@ -163,7 +158,13 @@ private CaptureFlow::ClosureNode asClosureNode(Node n) {
163158 result .( CaptureFlow:: ThisParameterNode ) .getCallable ( ) = n .( InstanceParameterNode ) .getCallable ( ) or
164159 exprNode ( result .( CaptureFlow:: MallocNode ) .getClosureExpr ( ) ) .( PostUpdateNode ) .getPreUpdateNode ( ) =
165160 n or
166- result .( CaptureFlow:: VariableWriteSourceNode ) .getVariableWrite ( ) .getSource ( ) = n
161+ exists ( CaptureInput:: VariableWrite write |
162+ result .( CaptureFlow:: VariableWriteSourceNode ) .getVariableWrite ( ) = write
163+ |
164+ n .asExpr ( ) = write .( VariableAssign ) .getSource ( )
165+ or
166+ n .asExpr ( ) = write .( AssignOp )
167+ )
167168}
168169
169170private predicate captureStoreStep ( Node node1 , CapturedVariableContent c , Node node2 ) {
You can’t perform that action at this time.
0 commit comments