Skip to content

Commit 298e4cf

Browse files
committed
Java: Recognize int-sized long literals.
1 parent 60826bd commit 298e4cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

java/ql/lib/semmle/code/java/dataflow/RangeUtils.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ pragma[nomagic]
8686
private predicate constantIntegerExpr(Expr e, int val) {
8787
e.(CompileTimeConstantExpr).getIntValue() = val
8888
or
89+
e.(LongLiteral).getValue().toInt() = val
90+
or
8991
exists(SsaExplicitWrite v, Expr src |
9092
e = v.getARead() and
9193
src = v.getValue() and

0 commit comments

Comments
 (0)