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

ASF GitHub Bot commented on DISPATCH-207:
-----------------------------------------

Github user ted-ross commented on a diff in the pull request:

    https://github.com/apache/qpid-dispatch/pull/43#discussion_r52058434
  
    --- Diff: src/message.c ---
    @@ -318,7 +318,7 @@ static int qd_check_and_advance(qd_buffer_t         
**buffer,
         int pre_consume = 1;  // Count the already extracted tag
         int consume     = 0;
         unsigned char tag = next_octet(&test_cursor, &test_buffer);
    -    if (!test_cursor) return 0;
    +
    --- End diff --
    
    Taking away this test removes the protection it provided and means that 
test_cursor may be referenced-as-null in the body of the following switch 
statement.  Here's a test case that I think may cause a problem with this 
change:  The body (from the tag forward) contains only E0 with no data 
following.  This is a malformed field, but it would cause next_octet to be 
called with a null cursor.
    A better solution would be to leave the test in place, but allow it to pass 
only if the tag is a 4x-class tag (i.e. zero length).


> When a message body of [ ] is sent from rhea it is rejected as an invalid 
> body 
> -------------------------------------------------------------------------------
>
>                 Key: DISPATCH-207
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-207
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Management Agent
>    Affects Versions: 0.5
>            Reporter: Ernest Allen
>
> When using rhea to send a management GET-SCHEMA request, a message body of [ 
> ] is expected. 
> However, an error is raised: ERROR (error) Invalid message: Invalid body value
> I originally thought this was raising an exception and the router was 
> becoming unresponsive, but I can't reproduce that behavior.
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to