File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -285,11 +285,17 @@ private module Cached {
285
285
// and we can remove this case.
286
286
n .asExpr ( ) .getExpr ( ) instanceof Self
287
287
or
288
+ // Nodes that can't be reached from another parameter or expression.
288
289
not localFlowStepTypeTracker + ( any ( Node e |
289
290
e instanceof ExprNode
290
291
or
291
292
e instanceof ParameterNode
292
293
) , n )
294
+ or
295
+ // Ensure all parameter SSA nodes are local sources -- this is needed by type tracking.
296
+ // Note that when the parameter has a default value, it will be reachable from an
297
+ // expression (the default value) and therefore won't be caught by the rule above.
298
+ n = LocalFlow:: getParameterDefNode ( _)
293
299
}
294
300
295
301
cached
You can’t perform that action at this time.
0 commit comments