Skip to content

Commit ee44e74

Browse files
committed
Data flow: Avoid bad join-order in pathIntoCallable0
1 parent 878203f commit ee44e74

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3561,13 +3561,10 @@ private predicate parameterCand(
35613561
pragma[nomagic]
35623562
private predicate pathIntoCallable0(
35633563
PathNodeMid mid, DataFlowCallable callable, int i, CallContext outercc, DataFlowCall call,
3564-
AccessPath ap
3564+
AccessPath ap, AccessPathApprox apa
35653565
) {
3566-
exists(AccessPathApprox apa |
3567-
pathIntoArg(mid, i, outercc, call, ap, apa) and
3568-
callable = resolveCall(call, outercc) and
3569-
parameterCand(callable, any(int j | j <= i and j >= i), apa, mid.getConfiguration())
3570-
)
3566+
pathIntoArg(mid, i, outercc, call, ap, apa) and
3567+
callable = resolveCall(call, outercc)
35713568
}
35723569

35733570
/**
@@ -3579,8 +3576,9 @@ private predicate pathIntoCallable(
35793576
PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc,
35803577
DataFlowCall call
35813578
) {
3582-
exists(int i, DataFlowCallable callable, AccessPath ap |
3583-
pathIntoCallable0(mid, callable, i, outercc, call, ap) and
3579+
exists(int i, DataFlowCallable callable, AccessPath ap, AccessPathApprox apa |
3580+
pathIntoCallable0(mid, callable, i, outercc, call, ap, apa) and
3581+
parameterCand(callable, i, apa, mid.getConfiguration()) and
35843582
p.isParameterOf(callable, i) and
35853583
(
35863584
sc = TSummaryCtxSome(p, ap)

0 commit comments

Comments
 (0)