src/share/vm/classfile/classFileParser.cpp

changeset 6762
5f7e12f5b4e5
parent 6593
9b289963cb9a
child 6765
f0d759a6a230
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Mon Mar 17 10:17:55 2014 -0400
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Wed Mar 19 14:02:51 2014 -0400
     1.3 @@ -2770,18 +2770,19 @@
     1.4    ClassFileStream* cfs = stream();
     1.5    u1* current_start = cfs->current();
     1.6  
     1.7 -  cfs->guarantee_more(2, CHECK);  // length
     1.8 -  int attribute_array_length = cfs->get_u2_fast();
     1.9 -
    1.10 -  guarantee_property(_max_bootstrap_specifier_index < attribute_array_length,
    1.11 -                     "Short length on BootstrapMethods in class file %s",
    1.12 -                     CHECK);
    1.13 -
    1.14    guarantee_property(attribute_byte_length > sizeof(u2),
    1.15                       "Invalid BootstrapMethods attribute length %u in class file %s",
    1.16                       attribute_byte_length,
    1.17                       CHECK);
    1.18  
    1.19 +  cfs->guarantee_more(attribute_byte_length, CHECK);
    1.20 +
    1.21 +  int attribute_array_length = cfs->get_u2_fast();
    1.22 +
    1.23 +  guarantee_property(_max_bootstrap_specifier_index < attribute_array_length,
    1.24 +                     "Short length on BootstrapMethods in class file %s",
    1.25 +                     CHECK);
    1.26 +
    1.27    // The attribute contains a counted array of counted tuples of shorts,
    1.28    // represending bootstrap specifiers:
    1.29    //    length*{bootstrap_method_index, argument_count*{argument_index}}

mercurial