mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8034926: Attribute classes properly
Add check to prevent underflow Reviewed-by: coleenp, ahgross
This commit is contained in:
parent
87a0f4a044
commit
9099e9ddcc
1 changed files with 5 additions and 0 deletions
|
@ -2777,6 +2777,11 @@ void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_b
|
|||
"Short length on BootstrapMethods in class file %s",
|
||||
CHECK);
|
||||
|
||||
guarantee_property(attribute_byte_length > sizeof(u2),
|
||||
"Invalid BootstrapMethods attribute length %u in class file %s",
|
||||
attribute_byte_length,
|
||||
CHECK);
|
||||
|
||||
// The attribute contains a counted array of counted tuples of shorts,
|
||||
// represending bootstrap specifiers:
|
||||
// length*{bootstrap_method_index, argument_count*{argument_index}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue