Skip to content

Commit 93bcc37

Browse files
committed
use pragma to improve 2 join-orders in TaintTracking
1 parent ce63809 commit 93bcc37

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

javascript/ql/src/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,10 @@ module TaintTracking {
738738
pragma[nomagic]
739739
private DataFlow::MethodCallNode execMethodCall() {
740740
result.getMethodName() = "exec" and
741-
result.getReceiver().analyze().getAType() = TTRegExp()
741+
exists(DataFlow::AnalyzedNode analyzed |
742+
pragma[only_bind_into](analyzed) = result.getReceiver().analyze() and
743+
analyzed.getAType() = TTRegExp()
744+
)
742745
}
743746

744747
/**
@@ -759,7 +762,10 @@ module TaintTracking {
759762
pragma[nomagic]
760763
private DataFlow::MethodCallNode matchMethodCall() {
761764
result.getMethodName() = "match" and
762-
result.getArgument(0).analyze().getAType() = TTRegExp()
765+
exists(DataFlow::AnalyzedNode analyzed |
766+
pragma[only_bind_into](analyzed) = result.getArgument(0).analyze() and
767+
analyzed.getAType() = TTRegExp()
768+
)
763769
}
764770

765771
/**

0 commit comments

Comments
 (0)