Correct input validation for 31 rounds

Closes gh-11470
This commit is contained in:
Josh Cummings 2022-07-11 14:04:39 -06:00
parent 614065bb3b
commit bc6f494af8
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
1 changed files with 1 additions and 1 deletions

View File

@ -543,7 +543,7 @@ public class BCrypt {
}
else {
rounds = roundsForLogRounds(log_rounds);
if (rounds < 16 || rounds > Integer.MAX_VALUE) {
if (rounds < 16 || rounds > 2147483648L) {
throw new IllegalArgumentException("Bad number of rounds");
}
}