You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Clifford Jansen (Jira)" <ji...@apache.org> on 2020/08/05 07:07:00 UTC

[jira] [Resolved] (QPID-8453) The message encoder for AMQP 1.0 incorrectly switches between map8 and map32 representations.

     [ https://issues.apache.org/jira/browse/QPID-8453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clifford Jansen resolved QPID-8453.
-----------------------------------
    Resolution: Fixed

> The message encoder for AMQP 1.0 incorrectly switches between map8 and map32 representations.
> ---------------------------------------------------------------------------------------------
>
>                 Key: QPID-8453
>                 URL: https://issues.apache.org/jira/browse/QPID-8453
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>    Affects Versions: qpid-cpp-1.39.0
>            Reporter: Clifford Jansen
>            Assignee: Clifford Jansen
>            Priority: Major
>         Attachments: codec.sh
>
>
> The encoder will use a more compact map8 encoding if it can write out a map that way. The wire representation of the map is:
> size_of_count_and_data
>  count
>  data
> Where the first two are 8 bits each for a map8 and 32 bits each for a map32.
> The test to switch between map8 and map32 neglects to factor in the additional "count" byte, but does add the extra byte and size while writing the encoding. This can result in using a map with size of 255 (excluding the count), deciding to use map8 encoding, and then writing a size_of_count_and_data of zero (uint8_t: 255 + 1).
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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