Skip to content

Commit dcaeeab

Browse files
committed
Rust: Fix capturedCallRead
1 parent 9dea9f5 commit dcaeeab

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private predicate capturedCallRead(Expr call, BasicBlock bb, int i, Variable v)
189189
hasCapturedRead(pragma[only_bind_into](v), pragma[only_bind_into](scope)) and
190190
(
191191
variableWriteInOuterScope(bb, any(int j | j < i), v, scope) or
192-
variableWriteInOuterScope(bb.getAPredecessor+(), _, v, scope)
192+
variableWriteInOuterScope(bb.getImmediateDominator+(), _, v, scope)
193193
) and
194194
call = bb.getNode(i).getAstNode()
195195
)

rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/SsaConsistency.expected

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)