Skip to content

Commit 0e298a8

Browse files
committed
PS: Flow through parentheses.
1 parent e683f04 commit 0e298a8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ module LocalFlow {
104104
or
105105
nodeFrom.asExpr() = nodeTo.asExpr().(CfgNodes::ExprNodes::ConvertCfgNode).getBase()
106106
or
107+
nodeFrom.asStmt() = nodeTo.asExpr().(CfgNodes::ExprNodes::ParenCfgNode).getBase()
108+
or
107109
exists(
108110
CfgNodes::ExprNodes::ArrayExprCfgNode arrayExpr, EscapeContainer::EscapeContainer container
109111
|

powershell/ql/test/library-tests/dataflow/local/test.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| test.ps1:13:6:13:10 | (...) | test.ps1:13:1:13:3 | d |
3232
| test.ps1:13:6:13:10 | (...) | test.ps1:13:1:13:10 | ...=... |
3333
| test.ps1:13:6:13:10 | (...) | test.ps1:13:6:13:10 | (...) |
34+
| test.ps1:13:7:13:9 | c | test.ps1:13:6:13:10 | (...) |
3435
| test.ps1:13:7:13:9 | c | test.ps1:13:7:13:9 | c |
3536
| test.ps1:14:1:14:8 | Sink | test.ps1:14:1:14:8 | pre-return value for Sink |
3637
| test.ps1:14:1:14:8 | Sink | test.ps1:14:1:14:8 | pre-return value for Sink |

0 commit comments

Comments
 (0)