Skip to content

Commit 2c41de6

Browse files
authored
Merge pull request github#6720 from aschackmull/java/isunreachableincall-joinorder
Java: Fix join-order in isUnreachableInCall.
2 parents dd1bed0 + c72e385 commit 2c41de6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,15 @@ predicate isUnreachableInCall(Node n, DataFlowCall call) {
294294
Guard guard
295295
|
296296
// get constant bool argument and parameter for this call
297-
viableParamArg(call, paramNode, arg) and
297+
viableParamArg(call, pragma[only_bind_into](paramNode), arg) and
298298
// get the ssa variable definition for this parameter
299299
param.isParameterDefinition(paramNode.getParameter()) and
300300
// which is used in a guard
301301
param.getAUse() = guard and
302302
// which controls `n` with the opposite value of `arg`
303303
guard
304304
.controls(n.asExpr().getBasicBlock(),
305-
pragma[only_bind_out](arg.getBooleanValue()).booleanNot())
305+
pragma[only_bind_into](pragma[only_bind_out](arg.getBooleanValue()).booleanNot()))
306306
)
307307
}
308308

0 commit comments

Comments
 (0)