Michael Jumper created GUACAMOLE-324:
----------------------------------------

             Summary: Incorrect buffer used in socket write
                 Key: GUACAMOLE-324
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-324
             Project: Guacamole
          Issue Type: Bug
          Components: libguac
            Reporter: Michael Jumper
            Priority: Minor


Within the file descriptor implementation of {{guac_socket}} (and possibly 
elsewhere), the call to {{send()}} or {{write()}} uses the pointer which always 
points to the beginning of the buffer, rather than the pointer which is updated 
as chunks are written:

https://github.com/apache/incubator-guacamole-server/blob/770a2805e4936aa73f17277a7ec6a762fdcc671a/src/libguac/socket-fd.c#L92-L118

This will result in duplicate data being written if the first write does not 
succeed in writing absolutely everything, most likely resulting in invalid 
protocol data and a disconnect.

Based on the fact that Guacamole works ... it seems this is rather unlikely in 
practice, but it should be fixed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to