From c553330ee32b7cb6f850cd982fdb0dd8244397f1 Mon Sep 17 00:00:00 2001 From: Aditya Sharad Date: Wed, 22 Dec 2021 16:03:01 -0800 Subject: [PATCH] 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. --- javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll b/javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll index 924e8f0a166..3f94bcc36eb 100644 --- a/javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll +++ b/javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll @@ -492,7 +492,7 @@ module AccessPath { */ pragma[noinline] private predicate hasWrite(ReachableBasicBlock bb) { - bb = getAccessTo(_, _, AccessPathRead()).getBasicBlock() + bb = getAccessTo(_, _, AccessPathWrite()).getBasicBlock() } /**