Skip to content

Commit

Permalink
Improve BigInteger bitLength check
Browse files Browse the repository at this point in the history
  • Loading branch information
sink772 committed Sep 27, 2024
1 parent 7bf8b27 commit 3810ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javaee/rt/src/java/s/java/math/BigInteger.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private boolean isValidRange(java.math.BigInteger u) {
}

private void verifyBitLength(int length) {
if (length > 512) {
if (Math.abs(length) > 512) {
throw new ArithmeticException("Out of the supported range");
}
}
Expand Down

0 comments on commit 3810ddc

Please sign in to comment.