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 9bd3c2a71f80e7790dc1ff86f51f331083689792 Author: Gary David Gregory (Code signing key) <ggreg...@apache.org> AuthorDate: Mon Nov 21 11:33:26 2022 -0500 org.apache.bcel.classfile.Code constructors now throw ClassFormatException on invalid input --- src/main/java/org/apache/bcel/classfile/Code.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/apache/bcel/classfile/Code.java b/src/main/java/org/apache/bcel/classfile/Code.java index 61997de7..e46a2da8 100644 --- a/src/main/java/org/apache/bcel/classfile/Code.java +++ b/src/main/java/org/apache/bcel/classfile/Code.java @@ -129,6 +129,7 @@ public final class Code extends Attribute { this.maxLocals = Args.requireU2(maxLocals, "maxLocals"); this.code = code != null ? code : ArrayUtils.EMPTY_BYTE_ARRAY; this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_CODE_EXCEPTION_ARRAY; + Args.requireU2(this.exceptionTable.length, "exceptionTable.length"); this.attributes = attributes != null ? attributes : EMPTY_ARRAY; super.setLength(calculateLength()); // Adjust length }