File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
ruby/ql/lib/codeql/ruby/typetracking Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -598,10 +598,17 @@ private DataFlow::Node evaluateSummaryComponentStackLocal(
598598 pragma [ only_bind_out ] ( tail ) ) and
599599 stack = SCS:: push ( pragma [ only_bind_out ] ( head ) , pragma [ only_bind_out ] ( tail ) )
600600 |
601- exists ( DataFlowDispatch:: ArgumentPosition apos , DataFlowDispatch:: ParameterPosition ppos |
601+ exists (
602+ DataFlowDispatch:: ArgumentPosition apos , DataFlowDispatch:: ParameterPosition ppos ,
603+ DataFlowPrivate:: ParameterNodeImpl p
604+ |
602605 head = SummaryComponent:: parameter ( apos ) and
603606 DataFlowDispatch:: parameterMatch ( ppos , apos ) and
604- result .( DataFlowPrivate:: ParameterNodeImpl ) .isSourceParameterOf ( prev .asExpr ( ) .getExpr ( ) , ppos )
607+ p .isSourceParameterOf ( prev .asExpr ( ) .getExpr ( ) , ppos ) and
608+ // We need to include both `p` and the SSA definition for `p`, since in type-tracking
609+ // the step from `p` to the SSA definition is considered a call step.
610+ result =
611+ [ p .( DataFlow:: Node ) , DataFlowPrivate:: LocalFlow:: getParameterDefNode ( p .getParameter ( ) ) ]
605612 )
606613 or
607614 head = SummaryComponent:: return ( ) and
You can’t perform that action at this time.
0 commit comments