Skip to content

Commit 5568f0e

Browse files
committed
JS: Pass local arguments to parameter value node, not SSA node
1 parent dc2d6a5 commit 5568f0e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

javascript/ql/src/semmle/javascript/dataflow/DataFlow.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,12 @@ module DataFlow {
13401340
succ = lvalueNode(param) // The SSA node represents the parameters's local variable
13411341
)
13421342
or
1343+
exists(Expr arg, Parameter param |
1344+
localArgumentPassing(arg, param) and
1345+
pred = valueNode(arg) and
1346+
succ = valueNode(param)
1347+
)
1348+
or
13431349
exists(PropertyPattern pattern |
13441350
pred = TPropNode(pattern) and
13451351
succ = lvalueNode(pattern.getValuePattern())
@@ -1475,8 +1481,7 @@ module DataFlow {
14751481
*/
14761482
private AST::ValueNode defSourceNode(VarDef def) {
14771483
result = def.getSource() or
1478-
result = def.getDestructuringSource() or
1479-
localArgumentPassing(result, def)
1484+
result = def.getDestructuringSource()
14801485
}
14811486

14821487
/**

0 commit comments

Comments
 (0)