File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
rust/ql/lib/codeql/rust/dataflow/internal
shared/dataflow/codeql/dataflow/internal Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,12 @@ private module StepsInput implements Impl::Private::StepsInputSig {
168
168
or
169
169
exists ( ArgumentPosition pos , Expr arg |
170
170
s .head ( ) = Impl:: Private:: SummaryComponent:: parameter ( pos ) and
171
- arg = getSourceNodeArgument ( source , s .tail ( ) .head ( ) ) and
171
+ arg = getSourceNodeArgument ( source , s .tail ( ) .headOfSingleton ( ) ) and
172
172
result .asParameter ( ) = getCallable ( arg ) .getParam ( pos .getPosition ( ) )
173
173
)
174
174
or
175
175
result .( RustDataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( ) .getExpr ( ) =
176
- getSourceNodeArgument ( source , s .head ( ) )
176
+ getSourceNodeArgument ( source , s .headOfSingleton ( ) )
177
177
}
178
178
179
179
RustDataFlow:: Node getSinkNode ( Input:: SinkBase sink , Impl:: Private:: SummaryComponent sc ) {
Original file line number Diff line number Diff line change @@ -709,6 +709,9 @@ module Make<
709
709
this = TConsSummaryComponentStack ( result , _)
710
710
}
711
711
712
+ /** Gets the head of this stack if it is a singleton. */
713
+ SummaryComponent headOfSingleton ( ) { this = TSingletonSummaryComponentStack ( result ) }
714
+
712
715
/** Gets the tail of this stack, if any. */
713
716
SummaryComponentStack tail ( ) { this = TConsSummaryComponentStack ( _, result ) }
714
717
You can’t perform that action at this time.
0 commit comments