Uploaded image for project: 'Apache Guacamole - Contributions'
  1. Apache Guacamole - Contributions
  2. GUAC-1374

"guac_socket_alloc()" must initialize "__keep_alive_enabled"

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.9.4, 0.9.5, 0.9.7, 0.9.8
    • Fix Version/s: 0.9.9
    • Component/s: libguac
    • Labels:
      None
    • Sprint:
      DEV 2015-10-30
    • Story Points:
      2

      Description

      Function guacamole_socket_alloc in server/src/libguac/server.c uses malloc to allocate a guac_socket structure but afterwards does not initialize:

      socket->__keep_alive_enabled = 0;

      If _keep_alive_enabled is not 0 by chance and if the calling procedure doesn't call guac_socket_require_keep_alive (which will overwrite keep_alive_enabled) guacd will try to access/join a _keep_alive_thread that doesn't exist.

      This error does occur only rarely, but is severe and hard to determine. To fix it simply add the initializing line to function guac_socket_alloc in server/src/libguac/server.c.

        Attachments

          Activity

            People

            Assignee:
            mike.jumper Michael Jumper
            Reporter:
            marwie Martin Wielebinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: