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 GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/14 15:40:00 UTC

[jira] [Commented] (PROTON-2517) The new C codec can misinterpret pn_data_t values resulting in unintended wire data.

    [ https://issues.apache.org/jira/browse/PROTON-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17506297#comment-17506297 ] 

ASF GitHub Bot commented on PROTON-2517:
----------------------------------------

cliffjansen opened a new pull request #362:
URL: https://github.com/apache/qpid-proton/pull/362


   Intercepts all pn_data_t emitter functions and does rewind.
   
   In array case, also points to first node so that pn_data_type and pn_data_get_array work properly.
   
   These are consistent with the old codec.
   
   Not done: save and restore of pn_data_t state at entry and exit on the assumption that the callers of the emmiter functions do not expect this state preserved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> The new C codec can misinterpret pn_data_t values resulting in unintended wire data.
> ------------------------------------------------------------------------------------
>
>                 Key: PROTON-2517
>                 URL: https://issues.apache.org/jira/browse/PROTON-2517
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.37.0
>            Reporter: Clifford Jansen
>            Assignee: Clifford Jansen
>            Priority: Major
>
> See the C++ frame trace from
>   https://issues.redhat.com/browse/ENTMQCL-3278
> The zero length array is printed instead of a null because the test in emit_multiple() from emitters.h fails to set the current node of the pn_data_t to the first node.  The test
>   if (pn_data_type(data) == PN_ARRAY) { //...
> fails and the array processing logic is bypassed, including the lines
>      switch (pn_data_get_array(data)) {
>         case 0:
>           pni_emitter_writef8(emitter, PNE_NULL);
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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