mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8340554: Improve MessageFormat readObject checks
Reviewed-by: naoto
This commit is contained in:
parent
7d5eefa506
commit
7af46a6b42
2 changed files with 9 additions and 3 deletions
|
@ -2041,7 +2041,7 @@ public class MessageFormat extends Format {
|
|||
|
||||
// Check the correctness of arguments and offsets
|
||||
if (isValid) {
|
||||
int lastOffset = patt.length() + 1;
|
||||
int lastOffset = patt.length();
|
||||
for (int i = maxOff; i >= 0; --i) {
|
||||
if (argNums[i] < 0 || argNums[i] >= MAX_ARGUMENT_INDEX
|
||||
|| offs[i] < 0 || offs[i] > lastOffset) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue