Skip to content

Commit 49af5ec

Browse files
authored
Update DivideByZeroUsingReturnValue.ql
1 parent 065ca3c commit 49af5ec

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-369/DivideByZeroUsingReturnValue.ql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@ predicate compareFunctionWithValue(Expr guardExp, Function compArg, Expr valArg)
122122
pragma[inline]
123123
predicate checkConditions1(Expr div, Function fn, float changeInt) {
124124
exists(Expr val |
125-
(
126-
val.getEnclosingFunction() = fn //or
127-
//val.getEnclosingFunction() = div.getEnclosingFunction()
128-
) and
125+
val.getEnclosingFunction() = fn and
129126
val.getValue().toFloat() = changeInt and
130127
compareFunctionWithValue(div, fn, val)
131128
)

0 commit comments

Comments
 (0)