aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-02-18 12:23:24 -0800
committerAndy Clement <aclement@pivotal.io>2016-02-18 12:23:24 -0800
commit3274cbbc06a28ceea357acdd2538f4cf04e95d2e (patch)
tree3ac80473f7e9b6eaf8f6a51da55cfd9d6d4eff09
parentf4c8433cb046e343b8491d04f0a10bd150924507 (diff)
downloadaspectj-3274cbbc06a28ceea357acdd2538f4cf04e95d2e.tar.gz
aspectj-3274cbbc06a28ceea357acdd2538f4cf04e95d2e.zip
Fix 487927: ClassFormatException if LocalVariableTable data cannot be fully read
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/BootstrapMethods.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/LineNumberTable.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/LocalVariableTable.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/MethodParameters.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeAnnos.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeParamAnnos.java2
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeTypeAnnos.java2
-rw-r--r--lib/bcel/bcel-src.zipbin326946 -> 326975 bytes
-rw-r--r--lib/bcel/bcel.jarbin285404 -> 285423 bytes
9 files changed, 7 insertions, 7 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/BootstrapMethods.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/BootstrapMethods.java
index a5216f2ef..f708c0cab 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/BootstrapMethods.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/BootstrapMethods.java
@@ -95,7 +95,7 @@ public final class BootstrapMethods extends Attribute {
BootstrapMethods(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
this(name_index, length, (BootstrapMethod[])null, constant_pool);
data = new byte[length];
- file.read(data);
+ file.readFully(data);
isInPackedState = true;
}
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/LineNumberTable.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/LineNumberTable.java
index 10d72fd3e..871bfe6bf 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/LineNumberTable.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/LineNumberTable.java
@@ -104,7 +104,7 @@ public final class LineNumberTable extends Attribute {
LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
this(name_index, length, (LineNumber[]) null, constant_pool);
data = new byte[length];
- file.read(data);
+ file.readFully(data);
isInPackedState = true;
// assert(bytesRead==length)
}
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/LocalVariableTable.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/LocalVariableTable.java
index 717bb5965..e6415dae6 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/LocalVariableTable.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/LocalVariableTable.java
@@ -109,7 +109,7 @@ public class LocalVariableTable extends Attribute {
LocalVariableTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {
super(Constants.ATTR_LOCAL_VARIABLE_TABLE, name_index, length, constant_pool);
data = new byte[length];
- file.read(data);
+ file.readFully(data);
isInPackedState = true;
// assert(bytesRead==length)
}
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/MethodParameters.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/MethodParameters.java
index 76f1642d5..547041584 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/MethodParameters.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/MethodParameters.java
@@ -38,7 +38,7 @@ public class MethodParameters extends Attribute {
public MethodParameters(int index, int length, DataInputStream dis, ConstantPool cpool) throws IOException {
super(Constants.ATTR_METHOD_PARAMETERS,index,length,cpool);
data = new byte[length];
- dis.read(data,0,length);
+ dis.readFully(data,0,length);
isInPackedState = true;
}
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeAnnos.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeAnnos.java
index c69b447ca..ac145087b 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeAnnos.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeAnnos.java
@@ -56,7 +56,7 @@ public abstract class RuntimeAnnos extends Attribute {
protected void readAnnotations(DataInputStream dis, ConstantPool cpool) throws IOException {
annotation_data = new byte[length];
- dis.read(annotation_data, 0, length);
+ dis.readFully(annotation_data, 0, length);
}
protected void writeAnnotations(DataOutputStream dos) throws IOException {
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeParamAnnos.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeParamAnnos.java
index 650bd2625..517ebee62 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeParamAnnos.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeParamAnnos.java
@@ -80,7 +80,7 @@ public abstract class RuntimeParamAnnos extends Attribute {
protected void readParameterAnnotations(DataInputStream dis,ConstantPool cpool) throws IOException {
annotation_data = new byte[length];
- dis.read(annotation_data,0,length);
+ dis.readFully(annotation_data,0,length);
}
private void inflate() {
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeTypeAnnos.java b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeTypeAnnos.java
index c783eae3b..fb5c32ce1 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeTypeAnnos.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/classfile/annotation/RuntimeTypeAnnos.java
@@ -34,7 +34,7 @@ public abstract class RuntimeTypeAnnos extends Attribute {
protected void readTypeAnnotations(DataInputStream dis,ConstantPool cpool) throws IOException {
annotation_data = new byte[length];
- dis.read(annotation_data,0,length);
+ dis.readFully(annotation_data,0,length);
}
public final void dump(DataOutputStream dos) throws IOException {
diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip
index 55e904c39..c96574cdf 100644
--- a/lib/bcel/bcel-src.zip
+++ b/lib/bcel/bcel-src.zip
Binary files differ
diff --git a/lib/bcel/bcel.jar b/lib/bcel/bcel.jar
index 79ff2ae98..5da57de72 100644
--- a/lib/bcel/bcel.jar
+++ b/lib/bcel/bcel.jar
Binary files differ