src/share/vm/classfile/classFileParser.cpp

changeset 6832
b207affc0618
parent 6782
f73af4455d7d
parent 6828
3b0fe4ec6ebe
child 6838
4930a95e6ef5
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Tue Jun 03 07:29:16 2014 -0700
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Tue Jun 03 21:36:53 2014 -0700
     1.3 @@ -2831,6 +2831,11 @@
     1.4        "bootstrap_method_index %u has bad constant type in class file %s",
     1.5        bootstrap_method_index,
     1.6        CHECK);
     1.7 +
     1.8 +    guarantee_property((operand_fill_index + 1 + argument_count) < operands->length(),
     1.9 +      "Invalid BootstrapMethods num_bootstrap_methods or num_bootstrap_arguments value in class file %s",
    1.10 +      CHECK);
    1.11 +
    1.12      operands->at_put(operand_fill_index++, bootstrap_method_index);
    1.13      operands->at_put(operand_fill_index++, argument_count);
    1.14  
    1.15 @@ -2848,7 +2853,6 @@
    1.16    }
    1.17  
    1.18    assert(operand_fill_index == operands->length(), "exact fill");
    1.19 -  assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode");
    1.20  
    1.21    u1* current_end = cfs->current();
    1.22    guarantee_property(current_end == current_start + attribute_byte_length,

mercurial