Author: markt
Date: Mon Jul 28 20:51:52 2014
New Revision: 1614169
URL: http://svn.apache.org/r1614169
Log:
When scanning class files (e.g. for annotations) and reading the number of
parameters in a <code>MethodParameters</code> structure only read a single byte
(rather than two bytes) as per the JVM specification. Patch provided by labes.
This closes #12.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/bcel/ (props changed)
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java
tomcat/trunk/webapps/docs/changelog.xml
Propchange: tomcat/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
Merged
/commons/proper/bcel/trunk/src/main/java/org/apache/bcel:r1609332-1614166
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java?rev=1614169&r1=1614168&r2=1614169&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java Mon
Jul 28 20:51:52 2014
@@ -182,7 +182,7 @@ final class Utility {
}
static void swallowMethodParameters(DataInput file) throws IOException {
- int parameters_count = file.readUnsignedShort();
+ int parameters_count = file.readUnsignedByte();
for (int i = 0; i < parameters_count; i++) {
file.readUnsignedShort(); // Unused name_index
file.readUnsignedShort(); // Unused access_flags
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1614169&r1=1614168&r2=1614169&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 28 20:51:52 2014
@@ -68,6 +68,12 @@
<bug>56724</bug>: Write an error message to Tomcat logs if container
background thread is aborted unexpectedly. (kkolinko)
</add>
+ <fix>
+ When scanning class files (e.g. for annotations) and reading the number
+ of parameters in a <code>MethodParameters</code> structure only read a
+ single byte (rather than two bytes) as per the JVM specification. Patch
+ provided by labes. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]