mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Do not pass regular positional args into the rest parameter
This commit is contained in:
@@ -287,7 +287,11 @@ abstract class LibraryCallable extends string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private predicate isParameterNodeImpl(Node p, DataFlowCallable c, ParameterPosition pos) {
|
private predicate isParameterNodeImpl(Node p, DataFlowCallable c, ParameterPosition pos) {
|
||||||
p = c.asSourceCallable().(Function).getParameter(pos.asPositional()).flow()
|
exists(Parameter parameter |
|
||||||
|
parameter = c.asSourceCallable().(Function).getParameter(pos.asPositional()) and
|
||||||
|
not parameter.isRestParameter() and
|
||||||
|
p = TValueNode(parameter)
|
||||||
|
)
|
||||||
or
|
or
|
||||||
pos.isThis() and p = TThisNode(c.asSourceCallable().(Function))
|
pos.isThis() and p = TThisNode(c.asSourceCallable().(Function))
|
||||||
or
|
or
|
||||||
|
|||||||
Reference in New Issue
Block a user