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(
598
598
pragma [ only_bind_out ] ( tail ) ) and
599
599
stack = SCS:: push ( pragma [ only_bind_out ] ( head ) , pragma [ only_bind_out ] ( tail ) )
600
600
|
601
- exists ( DataFlowDispatch:: ArgumentPosition apos , DataFlowDispatch:: ParameterPosition ppos |
601
+ exists (
602
+ DataFlowDispatch:: ArgumentPosition apos , DataFlowDispatch:: ParameterPosition ppos ,
603
+ DataFlowPrivate:: ParameterNodeImpl p
604
+ |
602
605
head = SummaryComponent:: parameter ( apos ) and
603
606
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 ( ) ) ]
605
612
)
606
613
or
607
614
head = SummaryComponent:: return ( ) and
You can’t perform that action at this time.
0 commit comments