Skip to content

Commit 9ff304c

Browse files
committed
Fix missing variable binding
1 parent ba05bf3 commit 9ff304c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ module LocalFlow {
226226
or
227227
isSuccessor = true and
228228
exists(ControlFlowElement cfe | cfe = e2.(TupleExpr).(PatternExpr).getPatternMatch() |
229-
cfe.(IsExpr).getExpr() = e1
229+
cfe.(IsExpr).getExpr() = e1 and scope = cfe
230230
or
231-
exists(Switch sw | sw.getACase() = cfe and sw.getExpr() = e1)
231+
exists(Switch sw | sw.getACase() = cfe and sw.getExpr() = e1 and scope = sw)
232232
)
233233
)
234234
}

0 commit comments

Comments
 (0)