Pavel Moravec created QPID-5424:
-----------------------------------

             Summary: [C++ broker] [AMQP 1.0] wrong encoding/decoding of 
boolean type
                 Key: QPID-5424
                 URL: https://issues.apache.org/jira/browse/QPID-5424
             Project: Qpid
          Issue Type: Bug
          Components: C++ Broker, C++ Client
    Affects Versions: 0.24, 0.22
            Reporter: Pavel Moravec


Both encoding/decoding AMQP 1.0 boolean primitive type seems to be wrong - it 
lacks specifying type constructor (0x56).

E.g. taking tcpdump of a client communication, I got PDU:

0000008e02000000005312d00000007e0000000aa12d6d795175657565325f66373562326532622d613930392d343063612d393832652d65323630386666623439363652004150025000005328d00000001a0000000ba1086d79517565756532520040520042404040404040005329d00000001600000007a1086d79517565756532520040520042404040405200

that is disassembled to:

0000008e = size(142)
02000000 = rest of header
00(descriptor_constructor) 53(fixed_one) 12(attach performative)
d0 = compound-four, i.e. list32
  0000007e(size=126)
  0000000a(count=10)
  (Name):  a1(str8) 2d(len=45) 
6d795175657565325f66373562326532622d613930392d343063612d393832652d653236303866666234393636(myQueue2_f75b2e2b-a909-40ca-982e-e2608ffb4966)
  (Handle):  52(smalluint) 00(0)
  (Role):  41.. = boolean value???


I see this reoccuring in any tcpdump I take - sometimes with Role 0x41 
("true"), sometimes 0x42 ("false"), depending on receiver/sender role of the 
peer.

As the bug is present both in encode and decode, neither broker or client 
complains of malformed PDU.

I see it in 0.22 while assume it in upstream as well (no change in relevant 
source code since that).




--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to