mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Fix conditionControlsMethod predicate
Exceptions for throw and return statements were missing the appropriate condition
This commit is contained in:
@@ -17,8 +17,8 @@ predicate conditionControlsMethod(MethodAccess ma, Expr e) {
|
||||
cb.controls(ma.getBasicBlock(), cond) and
|
||||
not cb.controls(any(SensitiveExecutionMethod sem).getAReference().getBasicBlock(),
|
||||
cond.booleanNot()) and
|
||||
not cb.controls(any(ThrowStmt t).getBasicBlock(), _) and
|
||||
not cb.controls(any(ReturnStmt r).getBasicBlock(), _) and
|
||||
not cb.controls(any(ThrowStmt t).getBasicBlock(), cond.booleanNot()) and
|
||||
not cb.controls(any(ReturnStmt r).getBasicBlock(), cond.booleanNot()) and
|
||||
e = cb.getCondition()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user