You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2017/02/03 17:00:52 UTC

[jira] [Updated] (PROTON-1384) [proton-j] 'Data' utility incorrectly encodes str32 type length

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

Robbie Gemmell updated PROTON-1384:
-----------------------------------
    Fix Version/s:     (was: proton-j-0.17.0)
                   proton-j-0.17.1

> [proton-j] 'Data' utility incorrectly encodes str32 type length
> ---------------------------------------------------------------
>
>                 Key: PROTON-1384
>                 URL: https://issues.apache.org/jira/browse/PROTON-1384
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.16.0
>            Reporter: Robbie Gemmell
>            Assignee: Robbie Gemmell
>             Fix For: proton-j-0.17.1
>
>
> 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):
> {noformat}
> @@ -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;
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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