Skip to content

Commit

Permalink
Merge pull request #13942 from hvitved/dataflow/variable-capture-cons…
Browse files Browse the repository at this point in the history
…istency-fix
  • Loading branch information
hvitved authored Aug 10, 2023
2 parents f6aca58 + 9b38028 commit 5a6ce29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shared/dataflow/codeql/dataflow/VariableCapture.qll
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,10 @@ module Flow<InputSig Input> implements OutputSig<Input> {
query predicate uniqueWriteCfgNode(string msg) { uniqueWriteCfgNode(_, msg) }

private predicate localWriteStep(VariableWrite vw, string msg) {
exists(BasicBlock bb |
vw.hasCfgNode(bb, _) and
bb.getEnclosingCallable() != vw.getVariable().getCallable() and
exists(BasicBlock bb1, BasicBlock bb2 |
vw.hasCfgNode(bb1, _) and
vw.getSource().hasCfgNode(bb2, _) and
bb1.getEnclosingCallable() != bb2.getEnclosingCallable() and
msg = "VariableWrite is not a local step"
)
}
Expand Down

0 comments on commit 5a6ce29

Please sign in to comment.