We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00f6f66 commit e7842b9Copy full SHA for e7842b9
cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql
@@ -74,10 +74,9 @@ private class RandS extends RandomFunction {
74
75
predicate missingGuard(VariableAccess va, string effect) {
76
exists(Operation op | op.getAnOperand() = va |
77
- (
78
- missingGuardAgainstUnderflow(op, va) and effect = "underflow" and
79
- not op instanceof MulExpr // random numbers are usually non-negative, so multiplication doesn't underflow.
80
- )
+ missingGuardAgainstUnderflow(op, va) and
+ effect = "underflow" and
+ not op instanceof MulExpr // random numbers are usually non-negative, so multiplication doesn't underflow.
81
or
82
missingGuardAgainstOverflow(op, va) and effect = "overflow"
83
)
0 commit comments