[
https://issues.apache.org/jira/browse/PROTON-2837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865539#comment-17865539
]
ASF subversion and git services commented on PROTON-2837:
---------------------------------------------------------
Commit 93e05f8f46b79a4e6f83dd099e95451014ed98c6 in qpid-protonj2's branch
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-protonj2.git;h=93e05f8f ]
PROTON-2837 Fix issue with buffer allocation for multi-byte encodings
When decoding some multi-byte encoded UTF8 strings the decoder is using the
wrong value to allocat a buffer to hold the resulting string decoded from
the multi byte segment plus and previously decoded single byte values.
Adds several tests and some additional validation on inputs to decoder
> Incorrect buffer size allocated in UTF 8 string decoding
> --------------------------------------------------------
>
> Key: PROTON-2837
> URL: https://issues.apache.org/jira/browse/PROTON-2837
> Project: Qpid Proton
> Issue Type: Bug
> Components: protonj2
> Affects Versions: protonj2-1.0.0-M20
> Reporter: Arnaud Cogoluègnes
> Assignee: Timothy A. Bish
> Priority: Minor
>
> The {{ProtonDecoderState.java#internalDecodeUTF8}} method does not allocate
> the right number of bytes for the working buffer. It should be the remainder
> of the string to decode ({{length - offset}}), not the number of readable
> bytes of the main buffer.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]