You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Radek Sedmak (JIRA)" <ji...@apache.org> on 2006/07/14 13:53:23 UTC
[jira] Created: (AMQ-823) Incorect handling of message size in
ByteArrayOutputStream::write
Incorect handling of message size in ByteArrayOutputStream::write
-----------------------------------------------------------------
Key: AMQ-823
URL: https://issues.apache.org/activemq/browse/AMQ-823
Project: ActiveMQ
Issue Type: Bug
Components: CMS
Affects Versions: incubation
Environment: RHEL 4/32bit
Reporter: Radek Sedmak
when you are sending message via openwire protocol, ByteArrayOutputStream::write is called in certain moment ...
when message size is greater then defaul CHUNK space is reallocated and there is "check for EOF offset".
if( offset > bodySize )
expandBody() ;
but should be there
if ( offset >= bodySize )
expandBody();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (AMQ-823) Incorect handling of message size in
ByteArrayOutputStream::write
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-823?page=all ]
Nathan Mittler resolved AMQ-823.
--------------------------------
Resolution: Fixed
Patch has been applied ... Thanks!
> Incorect handling of message size in ByteArrayOutputStream::write
> -----------------------------------------------------------------
>
> Key: AMQ-823
> URL: https://issues.apache.org/activemq/browse/AMQ-823
> Project: ActiveMQ
> Issue Type: Bug
> Components: CMS (C++ client)
> Affects Versions: incubation
> Environment: RHEL 4/32bit
> Reporter: Radek Sedmak
> Assigned To: Nathan Mittler
> Attachments: patch.txt
>
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> when you are sending message via openwire protocol, ByteArrayOutputStream::write is called in certain moment ...
> when message size is greater then defaul CHUNK space is reallocated and there is "check for EOF offset".
>
> if( offset > bodySize )
> expandBody() ;
> but should be there
> if ( offset >= bodySize )
> expandBody();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (AMQ-823) Incorect handling of message size in
ByteArrayOutputStream::write
Posted by "james strachan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-823?page=all ]
james strachan reassigned AMQ-823:
----------------------------------
Assignee: Nathan Mittler
> Incorect handling of message size in ByteArrayOutputStream::write
> -----------------------------------------------------------------
>
> Key: AMQ-823
> URL: https://issues.apache.org/activemq/browse/AMQ-823
> Project: ActiveMQ
> Issue Type: Bug
> Components: CMS (C++ client)
> Affects Versions: incubation
> Environment: RHEL 4/32bit
> Reporter: Radek Sedmak
> Assigned To: Nathan Mittler
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> when you are sending message via openwire protocol, ByteArrayOutputStream::write is called in certain moment ...
> when message size is greater then defaul CHUNK space is reallocated and there is "check for EOF offset".
>
> if( offset > bodySize )
> expandBody() ;
> but should be there
> if ( offset >= bodySize )
> expandBody();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (AMQ-823) Incorect handling of message size in
ByteArrayOutputStream::write
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-823?page=all ]
Timothy Bish updated AMQ-823:
-----------------------------
Attachment: patch.txt
This implements the suggested fix. The code was incorrect, the offset value is a zero based index, and when compared against the length, when it is equal to length the buffer needs to be increased. The current code would step one past the array size.
> Incorect handling of message size in ByteArrayOutputStream::write
> -----------------------------------------------------------------
>
> Key: AMQ-823
> URL: https://issues.apache.org/activemq/browse/AMQ-823
> Project: ActiveMQ
> Issue Type: Bug
> Components: CMS (C++ client)
> Affects Versions: incubation
> Environment: RHEL 4/32bit
> Reporter: Radek Sedmak
> Assigned To: Nathan Mittler
> Attachments: patch.txt
>
> Original Estimate: 10 minutes
> Remaining Estimate: 10 minutes
>
> when you are sending message via openwire protocol, ByteArrayOutputStream::write is called in certain moment ...
> when message size is greater then defaul CHUNK space is reallocated and there is "check for EOF offset".
>
> if( offset > bodySize )
> expandBody() ;
> but should be there
> if ( offset >= bodySize )
> expandBody();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira