6734068: Some variable length attributes set their size incorrectly.
authorjjg
Tue, 28 Jul 2009 11:00:05 -0700
changeset 3537 89c8080abf48
parent 3536 dee1b5833af7
child 3538 f2f87f1bc5ad
6734068: Some variable length attributes set their size incorrectly. Reviewed-by: mcimadamore
langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java
langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java
langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java
langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java
langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java
langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java
--- a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -58,7 +58,7 @@
     }
 
     public CharacterRangeTable_attribute(int name_index, Entry[] character_range_table) {
-        super(name_index, character_range_table.length * Entry.length());
+        super(name_index, 2 + character_range_table.length * Entry.length());
         this.character_range_table = character_range_table;
     }
 
--- a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LineNumberTable_attribute(int name_index, Entry[] line_number_table) {
-        super(name_index, line_number_table.length * Entry.length());
+        super(name_index, 2 + line_number_table.length * Entry.length());
         this.line_number_table_length = line_number_table.length;
         this.line_number_table = line_number_table;
     }
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LocalVariableTable_attribute(int name_index, Entry[] local_variable_table) {
-        super(name_index, local_variable_table.length * Entry.length());
+        super(name_index, 2 + local_variable_table.length * Entry.length());
         this.local_variable_table_length = local_variable_table.length;
         this.local_variable_table = local_variable_table;
     }
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LocalVariableTypeTable_attribute(int name_index, Entry[] local_variable_table) {
-        super(name_index, local_variable_table.length * Entry.length());
+        super(name_index, 2 + local_variable_table.length * Entry.length());
         this.local_variable_table_length = local_variable_table.length;
         this.local_variable_table = local_variable_table;
     }
--- a/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public ModuleExportTable_attribute(int name_index, int[] export_type_table) {
-        super(name_index, 2 * export_type_table.length);
+        super(name_index, 2 + 2 * export_type_table.length);
         this.export_type_table = export_type_table;
     }
 
--- a/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -49,7 +49,7 @@
     }
 
     public ModuleMemberTable_attribute(int name_index, int[] package_member_table) {
-        super(name_index, 2 * package_member_table.length);
+        super(name_index, 2 + 2 * package_member_table.length);
         this.package_member_table = package_member_table;
     }