src/share/vm/prims/jvm.cpp

Print this page

        

@@ -1409,10 +1409,13 @@
   instanceKlassHandle outer_klass;
   *inner_is_member = false;
 
   // Find inner_klass attribute
   for (int i = 0; i < i_length && !found; i += inner_class_next_offset) {
+    if (i == i_length - instanceKlass::enclosing_method_attribute_size) {
+      break;
+    }
     int ioff = i_icls->ushort_at(i + inner_class_info_index);
     int ooff = i_icls->ushort_at(i + outer_class_info_index);
     int noff = i_icls->ushort_at(i + inner_class_inner_name_offset);
     if (ioff != 0) {
       // Check to see if the name matches the class we're looking for