diff options
Diffstat (limited to 'src/main/javassist/bytecode/ConstPool.java')
-rw-r--r-- | src/main/javassist/bytecode/ConstPool.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java index 1ce26b3e..b5113e42 100644 --- a/src/main/javassist/bytecode/ConstPool.java +++ b/src/main/javassist/bytecode/ConstPool.java @@ -1433,6 +1433,9 @@ public final class ConstPool */ public void write(DataOutputStream out) throws IOException { + if (numOfItems < 0 || Short.MAX_VALUE < numOfItems) + throw new IOException("too many constant pool items " + numOfItems); + out.writeShort(numOfItems); LongVector v = items; int size = numOfItems; |