Skip to content

Commit 7dc698f

Browse files
committed
JS: Fix possible typo in DominatingPaths::hasWrite
Should most likely refer to `AccessPathWrite` and look for write nodes. This also improves the performance of `rankedAccessPath`, since the set of candidate blocks is now limited to blocks with both a read and a write.
1 parent 2f32d3c commit 7dc698f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ module AccessPath {
492492
*/
493493
pragma[noinline]
494494
private predicate hasWrite(ReachableBasicBlock bb) {
495-
bb = getAccessTo(_, _, AccessPathRead()).getBasicBlock()
495+
bb = getAccessTo(_, _, AccessPathWrite()).getBasicBlock()
496496
}
497497

498498
/**

0 commit comments

Comments
 (0)