Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
6.8.1
-
None
-
normal
-
P2
-
50922
Description
The code attribute length when dumped is not updated, and as such will write the old size of the attribute should the size of the actual byte code change.
A possible fix is adding:
"setLength(calculateLength());"
to the first line of:
org.apache.bcel.classfile.Code.dump(DataOutputStream) throws IOException
When trying to execute code that has this error, it throws a ClassFormatException, Wrong code segment length (Should there be no other formatting errors with the code).