Skip to content

Commit 444e607

Browse files
committed
C#: Add missing flow through library code using params arguments
1 parent f2dc2d9 commit 444e607

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,13 @@ module LibraryFlow {
18141814
x.hasExprPath(source.getSource(call), entry.(ExprNode).getControlFlowNode(), _, callCfn)
18151815
)
18161816
or
1817+
// The source is an implicit array for a `params` parameter
1818+
exists(DataFlowCall call, int pos |
1819+
pos = source.(CallableFlowSourceArg).getArgumentIndex() and
1820+
entry.(ParamsArgumentNode).argumentOf(call, pos) and
1821+
callCfn = call.getControlFlowNode()
1822+
)
1823+
or
18171824
// The source is the output of a supplied delegate argument, for
18181825
// example the output of `Foo` in `new Lazy(Foo)`
18191826
exists(DataFlowCall call, int pos |

0 commit comments

Comments
 (0)