Skip to content

Commit 1bbc67b

Browse files
committed
Java: Autoformat query.
1 parent ccbd8aa commit 1bbc67b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

java/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* external/cwe/cwe-197
1616
* external/cwe/cwe-681
1717
*/
18+
1819
import java
1920
import semmle.code.java.dataflow.RangeUtils
2021
import semmle.code.java.Conversions
@@ -25,7 +26,8 @@ predicate small(MulExpr e) {
2526
lhs = e.getLeftOperand().getProperExpr().(ConstantIntegerExpr).getIntValue() and
2627
rhs = e.getRightOperand().getProperExpr().(ConstantIntegerExpr).getIntValue() and
2728
lhs * rhs = res and
28-
t.getOrdPrimitiveType().getMinValue() <= res and res <= t.getOrdPrimitiveType().getMaxValue()
29+
t.getOrdPrimitiveType().getMinValue() <= res and
30+
res <= t.getOrdPrimitiveType().getMaxValue()
2931
)
3032
}
3133

@@ -52,4 +54,7 @@ where
5254
// not obviously small and ok
5355
not small(e) and
5456
e.getEnclosingCallable().fromSource()
55-
select c, "Potential overflow in $@ before it is converted to "+ destType.getName() +" by use in " + ("a " + c.kind()).regexpReplaceAll("^a ([aeiou])", "an $1") + ".", e, sourceType.getName() + " multiplication"
57+
select c,
58+
"Potential overflow in $@ before it is converted to " + destType.getName() + " by use in " +
59+
("a " + c.kind()).regexpReplaceAll("^a ([aeiou])", "an $1") + ".", e,
60+
sourceType.getName() + " multiplication"

0 commit comments

Comments
 (0)