mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
C++: Also check the number of parameters to keep the tests happy.
This commit is contained in:
@@ -19,7 +19,11 @@ import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
|
||||
import TaintedWithPath
|
||||
|
||||
predicate isUnboundedRandCall(FunctionCall fc) {
|
||||
fc.getTarget().hasGlobalOrStdOrBslName("rand") and not bounded(fc)
|
||||
exists(Function func | func = fc.getTarget() |
|
||||
func.hasGlobalOrStdOrBslName("rand") and
|
||||
not bounded(fc) and
|
||||
func.getNumberOfParameters() = 0
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user