mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
DataFlow: s/flowThroughStepAllowed/validParameterAliasStep.
This commit is contained in:
@@ -21,5 +21,5 @@ module CppDataFlow implements InputSig {
|
|||||||
|
|
||||||
predicate getAdditionalFlowIntoCallNodeTerm = Private::getAdditionalFlowIntoCallNodeTerm/2;
|
predicate getAdditionalFlowIntoCallNodeTerm = Private::getAdditionalFlowIntoCallNodeTerm/2;
|
||||||
|
|
||||||
predicate flowThroughStepAllowed = Private::flowThroughStepAllowed/2;
|
predicate validParameterAliasStep = Private::validParameterAliasStep/2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1162,7 +1162,7 @@ private int countNumberOfBranchesUsingParameter(SwitchInstruction switch, Parame
|
|||||||
*/
|
*/
|
||||||
bindingset[node1, node2]
|
bindingset[node1, node2]
|
||||||
pragma[inline_late]
|
pragma[inline_late]
|
||||||
predicate flowThroughStepAllowed(Node node1, Node node2) {
|
predicate validParameterAliasStep(Node node1, Node node2) {
|
||||||
// When flow-through summaries are computed we track which parameters flow to out-going parameters.
|
// When flow-through summaries are computed we track which parameters flow to out-going parameters.
|
||||||
// In an example such as:
|
// In an example such as:
|
||||||
// ```
|
// ```
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ signature module InputSig {
|
|||||||
* computing flow-through summaries.
|
* computing flow-through summaries.
|
||||||
*/
|
*/
|
||||||
bindingset[node1, node2]
|
bindingset[node1, node2]
|
||||||
default predicate flowThroughStepAllowed(Node node1, Node node2) { any() }
|
default predicate validParameterAliasStep(Node node1, Node node2) { any() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if data can flow from `node1` to `node2` through a non-local step
|
* Holds if data can flow from `node1` to `node2` through a non-local step
|
||||||
|
|||||||
@@ -552,7 +552,7 @@ module MakeImplCommon<InputSig Lang> {
|
|||||||
exists(Node mid |
|
exists(Node mid |
|
||||||
parameterValueFlowCand(p, mid, read) and
|
parameterValueFlowCand(p, mid, read) and
|
||||||
simpleLocalFlowStep(mid, node) and
|
simpleLocalFlowStep(mid, node) and
|
||||||
flowThroughStepAllowed(mid, node)
|
validParameterAliasStep(mid, node)
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
// read
|
// read
|
||||||
@@ -672,7 +672,7 @@ module MakeImplCommon<InputSig Lang> {
|
|||||||
exists(Node mid |
|
exists(Node mid |
|
||||||
parameterValueFlow(p, mid, read) and
|
parameterValueFlow(p, mid, read) and
|
||||||
simpleLocalFlowStep(mid, node) and
|
simpleLocalFlowStep(mid, node) and
|
||||||
flowThroughStepAllowed(mid, node)
|
validParameterAliasStep(mid, node)
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
// read
|
// read
|
||||||
|
|||||||
Reference in New Issue
Block a user