You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/11/19 14:39:48 UTC
[commons-bcel] 02/03: org.apache.bcel.classfile.StackMapType.StackMapType(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit c84f4923bf23c9fb7b53b6eb65fcf4c8b050c47b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 19 09:28:45 2022 -0500
org.apache.bcel.classfile.StackMapType.StackMapType(DataInput,
ConstantPool) reads signed instead of unsigned shorts from its DataInput
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/bcel/classfile/StackMapType.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 462d059c..4c143861 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -88,6 +88,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">InstructionConstants.DCONST_0 value is wrong (regression from 6.6.0).</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Avoid internal NPE in org.apache.bcel.util.ClassPath.getInputStream(String, String).</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.bcel.classfile.StackMapEntry.StackMapEntry(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput.</action>
+ <action type="fix" dev="ggregory" due-to="Gary Gregory">org.apache.bcel.classfile.StackMapType.StackMapType(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput.</action>
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump spotbugs-maven-plugin from 4.7.2.2 to 4.7.3.0 #167.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump jmh.version from 1.35 to 1.36 #170.</action>
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapType.java b/src/main/java/org/apache/bcel/classfile/StackMapType.java
index 5f76689c..aff4bcb1 100644
--- a/src/main/java/org/apache/bcel/classfile/StackMapType.java
+++ b/src/main/java/org/apache/bcel/classfile/StackMapType.java
@@ -54,7 +54,7 @@ public final class StackMapType implements Cloneable {
StackMapType(final DataInput file, final ConstantPool constantPool) throws IOException {
this(file.readByte(), -1, constantPool);
if (hasIndex()) {
- this.index = file.readShort();
+ this.index = file.readUnsignedShort();
}
this.constantPool = constantPool;
}