]
Steve Ebersole updated HHH-5453:
--------------------------------
Assignee: Steve Ebersole
Affects Version/s: (was: 3.6.0.Beta2)
(was: 3.5.4)
(was: 3.5.3)
(was: 3.5.2)
(was: 3.5.0-Final)
(was: 3.5.1)
(was: 3.5.0-CR-1)
(was: 3.5.0-Beta-4)
(was: 3.5.0-CR-2)
(was: 3.5.0-Beta-3)
(was: 3.5.0-Beta-2)
(was: 3.3.2)
Fix Version/s: 3.6.0.Beta4
ByteCodeHelper.readByteCode won't load classes bigger than a
constant size
--------------------------------------------------------------------------
Key: HHH-5453
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5453
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.3.1, 3.5.0.Beta-1, 3.6.0.Beta1
Reporter: Marcos Pernambuco
Assignee: Steve Ebersole
Fix For: 3.6.0.Beta4
Attachments: ByteCodeHelper.readByteCode.svn.diff
Although it is unlikely that a class will have more than 409600 bytes,
ByteCodeHelper.readByteCode() will fail in this case.
The programmer's intention was clear: handle any file size; but he or she forgot to
add a call to inputStream.read() at the end of the loop
...
r = inputStream.read( buffer );
while ( r >= buffer.length ) {
byte[] temp = new byte[ classBytes.length + buffer.length ];
System.arraycopy( classBytes, 0, temp, 0, classBytes.length );
System.arraycopy( buffer, 0, temp, classBytes.length, buffer.length );
classBytes = temp;
// THERE SHOULD BE A "r = inputStream.read( buffer )" HERE
}
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: