You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/11/04 15:50:00 UTC

[jira] [Commented] (PROTON-2455) Workaround for bad use of pn_buffer_append in messenger library

    [ 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: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org