Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/guacamole-server/pull/183#discussion_r216497523
  
    --- Diff: src/libguac/parser.c ---
    @@ -222,7 +222,11 @@ int guac_parser_read(guac_parser* parser, guac_socket* 
socket, int usec_timeout)
                 retval = guac_socket_select(socket, usec_timeout);
                 if (retval <= 0)
                     return -1;
    -           
    +            
    +            /* Reset pointers if instruction buf len is less than max 
instruction len */
    +            if (buffer_end - unparsed_end < GUAC_INSTRUCTION_MAX_LENGTH)
    +                unparsed_end = unparsed_start = parser->__instructionbuf;
    --- End diff --
    
    @changkun, if you are confident that these changes are correct, can you 
perhaps provide a sequence of `read()`s that demonstrate that the parser 
(without these changes) incorrectly generates a parse error? 


---

Reply via email to