Skip to content

Commit 392c948

Browse files
authored
Update DivideByZeroUsingReturnValue.ql
1 parent 50105c1 commit 392c948

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ predicate mayBeReturnValue(Function fn, Expr val) {
3030
or
3131
exists(Initializer it |
3232
globalValueNumber(it.getExpr()) = globalValueNumber(tmpExp) and
33-
it.getDeclaration().(Variable).getAnAccess().(VariableAccess).getTarget() =
33+
it.getDeclaration().(Variable).getAnAccess().getTarget() =
3434
globalValueNumber(rs.getExpr()).getAnExpr().(VariableAccess).getTarget()
3535
)
3636
)
@@ -61,7 +61,7 @@ predicate mayBeReturnZero(Function fn) {
6161
fn.hasName(["getc", "atoi"])
6262
}
6363

64-
/** The function returns Guard which compares the expression `bound` */
64+
/** Gets the Guard which compares the expression `bound` */
6565
pragma[inline]
6666
GuardCondition checkByValue(Expr bound, Expr val) {
6767
exists(GuardCondition gc |
@@ -178,7 +178,7 @@ predicate checkConditions2(Expr div, Expr divVal, float changeInt2) {
178178
)
179179
}
180180

181-
/** The function returns the value of the difference or summand from the expression `src`. */
181+
/** Gets the value of the difference or summand from the expression `src`. */
182182
float getValueOperand(Expr src, Expr e1, Expr e2) {
183183
src.(SubExpr).hasOperands(e1, e2) and
184184
result = e2.getValue().toFloat()
@@ -194,7 +194,7 @@ Expr getMulDivOperand(Expr e1) {
194194
result = e1.(DivExpr).getLeftOperand()
195195
}
196196

197-
/** Class that defines possible variants of the division expression or the search for the remainder. */
197+
/** The class that defines possible variants of the division expression or the search for the remainder. */
198198
class MyDiv extends Expr {
199199
MyDiv() {
200200
this instanceof DivExpr or

0 commit comments

Comments
 (0)