Skip to content

Commit f46620c

Browse files
committed
Var only used in one side of disjunct
1 parent 6a3d995 commit f46620c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ruby/ql/lib/codeql/ruby/frameworks/Mysql2.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ module Mysql2 {
3535
private DataFlow::Node query;
3636

3737
Mysql2Execution() {
38-
exists(Mysql2Connection mysql2Connection, DataFlow::CallNode prepareCall |
38+
exists(Mysql2Connection mysql2Connection |
3939
this = mysql2Connection.getAMethodCall("query") and query = this.getArgument(0)
4040
or
41-
prepareCall = mysql2Connection.getAMethodCall("prepare") and
42-
query = prepareCall.getArgument(0) and
43-
this = prepareCall.getAMethodCall("execute")
41+
exists(DataFlow::CallNode prepareCall |
42+
prepareCall = mysql2Connection.getAMethodCall("prepare") and
43+
query = prepareCall.getArgument(0) and
44+
this = prepareCall.getAMethodCall("execute")
45+
)
4446
)
4547
}
4648

0 commit comments

Comments
 (0)