diff src/share/vm/classfile/classFileParser.cpp @ 18060:b207affc0618

Merge
author asaha
date Tue, 03 Jun 2014 21:36:53 -0700
parents f73af4455d7d 3b0fe4ec6ebe
children 4930a95e6ef5
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Tue Jun 03 07:29:16 2014 -0700
+++ b/src/share/vm/classfile/classFileParser.cpp	Tue Jun 03 21:36:53 2014 -0700
@@ -2831,6 +2831,11 @@
       "bootstrap_method_index %u has bad constant type in class file %s",
       bootstrap_method_index,
       CHECK);
+
+    guarantee_property((operand_fill_index + 1 + argument_count) < operands->length(),
+      "Invalid BootstrapMethods num_bootstrap_methods or num_bootstrap_arguments value in class file %s",
+      CHECK);
+
     operands->at_put(operand_fill_index++, bootstrap_method_index);
     operands->at_put(operand_fill_index++, argument_count);
 
@@ -2848,7 +2853,6 @@
   }
 
   assert(operand_fill_index == operands->length(), "exact fill");
-  assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode");
 
   u1* current_end = cfs->current();
   guarantee_property(current_end == current_start + attribute_byte_length,