Skip to content

Commit 4de564e

Browse files
committed
C#: Replace reference to controlsBlock and simplify.
1 parent f6dfcf1 commit 4de564e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,10 @@ class ReverseDnsSource extends Source {
7272
}
7373
}
7474

75-
pragma[noinline]
76-
private predicate conditionControlsCall0(
77-
SensitiveExecutionMethodCall call, Expr e, ControlFlow::BooleanSuccessor s
78-
) {
79-
forex(BasicBlock bb | bb = call.getAControlFlowNode().getBasicBlock() | e.controlsBlock(bb, s, _))
80-
}
81-
8275
private predicate conditionControlsCall(
8376
SensitiveExecutionMethodCall call, SensitiveExecutionMethod def, Expr e, boolean cond
8477
) {
85-
exists(ControlFlow::BooleanSuccessor s | cond = s.getValue() | conditionControlsCall0(call, e, s)) and
78+
e.(Guard).directlyControls(call.getBasicBlock(), cond) and
8679
def = call.getTarget().getUnboundDeclaration()
8780
}
8881

0 commit comments

Comments
 (0)