[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    [jira] Reopened: (AMQ-718) Incorrect length specification in loose
From:       "Hiram Chirino (JIRA)" <jira () apache ! org>
Date:       2006-05-30 18:37:51
Message-ID: 681951.1149014271642.JavaMail.jira () brutus
[Download RAW message or body]

     [ https://issues.apache.org/activemq/browse/AMQ-718?page=all ]
     
Hiram Chirino reopened AMQ-718:
-------------------------------


fixing in 4.0

> Incorrect length specification in loose encoding?
> -------------------------------------------------
> 
> Key: AMQ-718
> URL: https://issues.apache.org/activemq/browse/AMQ-718
> Project: ActiveMQ
> Type: Bug

> Components: Transport
> Versions: 4.0, 4.0 RC2, 4.0 RC3
> Reporter: Andrew Lusk
> Assignee: Hiram Chirino
> Fix For: 4.0

> 
> 
> Unless loose-encoded length is mean to mean something different from tight-encoded \
> length, I believe that the length written to the wire for loosely-encoded OpenWire \
> messages is off by 4.  I imagine this hasn't been caught before because most \
> clients synchronously read packets off the wire and so can ignore the length \
>                 specification.
> --- activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java    \
>                 (revision 399408)
> +++ activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java    \
> (working copy) @@ -172,7 +172,7 @@
> sequence = baos.toByteSequence();
> 
> if( !sizePrefixDisabled ) {
> -                        size = sequence.getLength()-4;
> +                        size = sequence.getLength();
> ByteArrayPacket packet = new ByteArrayPacket(sequence);
> PacketData.writeIntBig(packet, size);
> }
> @@ -253,7 +253,7 @@
> if( !sizePrefixDisabled ) {
> looseOut.close();
> ByteSequence sequence = baos.toByteSequence();
> -                    dataOut.writeInt(sequence.getLength()-4);
> +                    dataOut.writeInt(sequence.getLength());
> dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
> }
> 

-- 
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic