Skip to contentSkip to conversation

Fix crash when connecting to VNC through websocket

PATCH In review Jorge Acereda Maciá 2 participants 2 messages Feb 25, 2015 – Feb 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix crash when connecting to VNC through websocket

Connecting to VNC through websocket crashes in vnc_flush() when trying to acquire a mutex that hasn't been initialized (vnc_init_state(vs) hasn't been called at this point).

---
 ui/vnc-ws.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
ui/vnc-ws.c +1 -2
index e304baf..d75950d 100644
@@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState *vs, const char* key)
     }
 
     response = g_strdup_printf(WS_HANDSHAKE, accept);
-    vnc_write(vs, response, strlen(response));
-    vnc_flush(vs);
+    vnc_client_write_buf(vs, (const uint8_t *)response, strlen(response));
 
     g_free(accept);
     g_free(response);
Signature · 1 line
1.9.3 (Apple Git-50)
#1 lore raw
Quoted 3 lines · Jorge Acereda Maciá

Connecting to VNC through websocket crashes in vnc_flush() when trying to acquire a mutex that hasn't been initialized (vnc_init_state(vs) hasn't been called at this point).

Patch updated.

thanks,
Gerd