From 339c40c2b7d280ff83dfe8e51d95923ce06f44cf Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 18 Apr 2024 21:28:52 +0200 Subject: [PATCH] Data flow: Fix bad join --- shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll index d445fa6237ee..560ea29e96c3 100644 --- a/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll +++ b/shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll @@ -4469,6 +4469,12 @@ module MakeImpl Lang> { ) } + bindingset[par, ret] + pragma[inline_late] + private predicate summaryCtxStepStar(PathNodeImpl par, PathNodeImpl ret) { + summaryCtxStep*(par) = ret + } + /** * Holds if `(arg, par, ret, out)` forms a subpath-tuple. * @@ -4483,7 +4489,7 @@ module MakeImpl Lang> { any(PathNodeImpl n | localStepToHidden*(ret, n)), out) and not par.isHidden() and not ret.isHidden() and - ret = summaryCtxStep*(par) + summaryCtxStepStar(par, ret) or // wrapped subpath using hidden nodes, e.g. flow through a callback inside // a summarized callable