[
https://issues.apache.org/jira/browse/PROTON-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17438796#comment-17438796
]
ASF subversion and git services commented on PROTON-2455:
---------------------------------------------------------
Commit 97f1a73e80b613f66924ef9c44ca9124435a383c in qpid-proton's branch
refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=97f1a73 ]
PROTON-2455: Fix to PROTON-2425 for hacky use of pn_buffer in messenger
> Workaround for bad use of pn_buffer_append in messenger library
> ---------------------------------------------------------------
>
> Key: PROTON-2455
> URL: https://issues.apache.org/jira/browse/PROTON-2455
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: proton-c-0.36.0
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Minor
> Fix For: proton-c-0.37.0
>
>
> The messenger library uses the pn_buffer API as a way to get expandable
> memory space. However it just writes directly into the space it gets and then
> append that space (which is internal to a buffer) to the buffer to adjust the
> buffers internal bookkeeping.
> This is not supposed to be allowed in the API, but didn't matter before as
> pn_buffer_append used memmove(). It is now technically undefined as we
> started using memcpy() in pn_buffer_append.
> The operation has the same source and destination address so can be elided as
> aworkaround to avoid the undefined behaviour.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]