Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1384

the 'Data' utility incorrectly encodes str32 type length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-j-0.17.0
    • proton-j-0.18.0
    • proton-j
    • None

    Description

      The 'Data' utility incorrectly encodes str32 type, due to a (probable c&p) error in StringElement, it encodes the length as a [u]byte when it should be a [u]int.

      Something like below should fix things (will make it after the reorg is done, and I add a test):

      @@ -127,7 +127,7 @@ class StringElement extends AtomicElement<String>
               else
               {
                   b.put((byte)0xb1);
      -            b.put((byte)length);
      +            b.putInt(length);
               }
               b.put(bytes);
               return size;
      

      Attachments

        Activity

          People

            robbie Robbie Gemmell
            robbie Robbie Gemmell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: