Andrew Stitcher created PROTON-2455:
---------------------------------------
Summary: 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
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]