Skip to content

Commit 06575ef

Browse files
committed
Data flow: Fix bad join-order
1 parent aa9444b commit 06575ef

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,17 @@ module Private {
736736
}
737737

738738
pragma[nomagic]
739-
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
740-
exists(DataFlowCall call, ParameterPosition ppos, SummarizedCallable sc |
739+
private ParamNode summaryArgParam0(DataFlowCall call, ArgNode arg) {
740+
exists(ParameterPosition ppos, SummarizedCallable sc |
741741
argumentPositionMatch(call, arg, ppos) and
742-
viableParam(call, sc, ppos, result) and
742+
viableParam(call, sc, ppos, result)
743+
)
744+
}
745+
746+
pragma[nomagic]
747+
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
748+
exists(DataFlowCall call |
749+
result = summaryArgParam0(call, arg) and
743750
out = rk.getAnOutNode(call)
744751
)
745752
}

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,17 @@ module Private {
736736
}
737737

738738
pragma[nomagic]
739-
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
740-
exists(DataFlowCall call, ParameterPosition ppos, SummarizedCallable sc |
739+
private ParamNode summaryArgParam0(DataFlowCall call, ArgNode arg) {
740+
exists(ParameterPosition ppos, SummarizedCallable sc |
741741
argumentPositionMatch(call, arg, ppos) and
742-
viableParam(call, sc, ppos, result) and
742+
viableParam(call, sc, ppos, result)
743+
)
744+
}
745+
746+
pragma[nomagic]
747+
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
748+
exists(DataFlowCall call |
749+
result = summaryArgParam0(call, arg) and
743750
out = rk.getAnOutNode(call)
744751
)
745752
}

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,17 @@ module Private {
736736
}
737737

738738
pragma[nomagic]
739-
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
740-
exists(DataFlowCall call, ParameterPosition ppos, SummarizedCallable sc |
739+
private ParamNode summaryArgParam0(DataFlowCall call, ArgNode arg) {
740+
exists(ParameterPosition ppos, SummarizedCallable sc |
741741
argumentPositionMatch(call, arg, ppos) and
742-
viableParam(call, sc, ppos, result) and
742+
viableParam(call, sc, ppos, result)
743+
)
744+
}
745+
746+
pragma[nomagic]
747+
private ParamNode summaryArgParam(ArgNode arg, ReturnKindExt rk, OutNodeExt out) {
748+
exists(DataFlowCall call |
749+
result = summaryArgParam0(call, arg) and
743750
out = rk.getAnOutNode(call)
744751
)
745752
}

0 commit comments

Comments
 (0)