mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Adding exclusion for main's argv (I believe this and other changes were accidentally removed in prior merge with other non-const branches)
This commit is contained in:
@@ -69,7 +69,10 @@ predicate isNonConst(DataFlow::Node node) {
|
|||||||
// Parameters of uncalled functions that aren't const
|
// Parameters of uncalled functions that aren't const
|
||||||
exists(UncalledFunction f, Parameter p |
|
exists(UncalledFunction f, Parameter p |
|
||||||
f.getAParameter() = p and
|
f.getAParameter() = p and
|
||||||
p = node.asParameter()
|
p = node.asParameter() and
|
||||||
|
// Ignore main's argv parameter as it is already considered a `FlowSource`
|
||||||
|
// not ignoring it will result in path redundancies
|
||||||
|
(f.getName() = "main" implies p.getName() != "argv")
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
// Consider as an input any out arg of a function or a function's return where the function is not:
|
// Consider as an input any out arg of a function or a function's return where the function is not:
|
||||||
|
|||||||
Reference in New Issue
Block a user