Skip to content

Commit 8dd99b9

Browse files
committed
Data flow: Exclude expectsContent nodes from lambda flow
1 parent 0855797 commit 8dd99b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private module LambdaFlow {
182182
boolean toJump, DataFlowCallOption lastCall
183183
) {
184184
revLambdaFlow0(lambdaCall, kind, node, t, toReturn, toJump, lastCall) and
185+
not expectsContent(node, _) and
185186
if castNode(node) or node instanceof ArgNode or node instanceof ReturnNode
186187
then compatibleTypes(t, getNodeDataFlowType(node))
187188
else any()

0 commit comments

Comments
 (0)