Skip to content

Commit 82d92dc

Browse files
author
Max Schaefer
committed
JavaScript: Avoid bad join order.
The optimiser decided that it would be a great idea to start the pipeline with `getReturn().getAUse().(DataFlow::InvokeNode)`. It's not.
1 parent 500f7bd commit 82d92dc

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

javascript/ql/src/semmle/javascript/frameworks/SystemCommandExecutors.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,16 @@ private class SystemCommandExecutors extends SystemCommandExecution, DataFlow::I
6363
boolean sync;
6464

6565
SystemCommandExecutors() {
66-
exists(string mod, API::Feature callee |
66+
exists(string mod |
6767
exists(string fn |
6868
execApi(mod, fn, cmdArg, optionsArg, shell) and
6969
sync = getSync(fn) and
70-
callee = API::moduleImport(mod).getMember(fn)
70+
this = API::moduleImport(mod).getMember(fn).getReturn().getAUse()
7171
)
7272
or
7373
execApi(mod, cmdArg, optionsArg, shell) and
7474
sync = false and
75-
callee = API::moduleImport(mod)
76-
|
77-
this = callee.getReturn().getAUse()
75+
this = API::moduleImport(mod).getReturn().getAUse()
7876
)
7977
or
8078
this = API::moduleImport("foreground-child").getReturn().getAUse() and

0 commit comments

Comments
 (0)