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 615c805 commit 8765c33Copy full SHA for 8765c33
cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql
@@ -19,7 +19,11 @@ import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
19
import TaintedWithPath
20
21
predicate isUnboundedRandCall(FunctionCall fc) {
22
- fc.getTarget().hasGlobalOrStdOrBslName("rand") and not bounded(fc)
+ exists(Function func | func = fc.getTarget() |
23
+ func.hasGlobalOrStdOrBslName("rand") and
24
+ not bounded(fc) and
25
+ func.getNumberOfParameters() = 0
26
+ )
27
}
28
29
/**
0 commit comments