Skip to content

Commit 7756259

Browse files
authored
Merge pull request #16602 from hvitved/dataflow/fix-bad-join
Data flow: Fix bad join
2 parents 2f95851 + 059ce1b commit 7756259

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3370,18 +3370,19 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
33703370
Location getLocation() { result = p.getLocation() }
33713371
}
33723372

3373+
pragma[nomagic]
3374+
private predicate stage5ConsCand(Content c, DataFlowType t, AccessPathFront apf, int len) {
3375+
Stage5::consCand(c, t, any(AccessPathApprox ap | ap.getFront() = apf and ap.len() = len - 1))
3376+
}
3377+
33733378
/**
33743379
* Gets the number of length 2 access path approximations that correspond to `apa`.
33753380
*/
33763381
private int count1to2unfold(AccessPathApproxCons1 apa) {
33773382
exists(Content c, int len |
33783383
c = apa.getHead() and
33793384
len = apa.len() and
3380-
result =
3381-
strictcount(DataFlowType t, AccessPathFront apf |
3382-
Stage5::consCand(c, t,
3383-
any(AccessPathApprox ap | ap.getFront() = apf and ap.len() = len - 1))
3384-
)
3385+
result = strictcount(DataFlowType t, AccessPathFront apf | stage5ConsCand(c, t, apf, len))
33853386
)
33863387
}
33873388

0 commit comments

Comments
 (0)