Skip to content

Commit 58d5ad4

Browse files
authored
Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql
1 parent d7c1477 commit 58d5ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class UsingArithmeticInComparison extends BinaryArithmeticOperation {
105105
}
106106
}
107107

108-
from Expr exp, WhileStmt wst
108+
from Expr exp
109109
where
110110
exp instanceof UsingArithmeticInComparison and
111111
not exp.(UsingArithmeticInComparison).workingWithValue() and
@@ -114,5 +114,5 @@ where
114114
not exp.(UsingArithmeticInComparison).compareWithZero() and
115115
exp.(UsingArithmeticInComparison).compareWithOutZero()
116116
or
117-
wst instanceof UsingWhileAfterWhile and exp = wst.getCondition()
117+
exists(WhileStmt wst | wst instanceof UsingWhileAfterWhile and exp = wst.getCondition())
118118
select exp, "this expression needs your attention"

0 commit comments

Comments
 (0)