mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8336833: Endless loop in Javap ClassWriter
Reviewed-by: liach
This commit is contained in:
parent
4da9915875
commit
0db6c15efe
2 changed files with 24 additions and 2 deletions
|
@ -317,7 +317,7 @@ public abstract sealed class AbstractInstruction
|
|||
int pad = ap - (pos + 1);
|
||||
int low = code.classReader.readInt(ap + 4);
|
||||
int high = code.classReader.readInt(ap + 8);
|
||||
if (high < low || high - low > code.codeLength >> 2) {
|
||||
if (high < low || (long)high - low > code.codeLength >> 2) {
|
||||
throw new IllegalArgumentException("Invalid tableswitch values low: " + low + " high: " + high);
|
||||
}
|
||||
int cnt = high - low + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue