Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8453

The message encoder for AMQP 1.0 incorrectly switches between map8 and map32 representations.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • qpid-cpp-1.39.0
    • None
    • C++ Client
    • None

    Description

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

       

      Attachments

        1. codec.sh
          0.4 kB
          Clifford Jansen

        Activity

          People

            cliffjansen Clifford Jansen
            cliffjansen Clifford Jansen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: