Received: from eggs.gnu.org ([2001:4830:134:3::10]:52118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlGy-0004Qd-40 for qemu-devel@nongnu.org; Wed, 25 Feb 2015 18:21:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQlGu-0006c6-Rd for qemu-devel@nongnu.org; Wed, 25 Feb 2015 18:21:44 -0500 From: =?utf-8?Q?Jorge_Acereda_Maci=C3=A1?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Thu, 26 Feb 2015 00:21:39 +0100 Message-Id: <8A3EBB15-2138-4AC6-92B7-B0DA9825225A@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: [Qemu-devel] [PATCH v2] Fix crash when connecting to VNC through websocket List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, kraxel@redhat.com, aliguori@amazon.com 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). Signed-off-by: Jorge Acereda Macia --- ui/vnc-ws.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/vnc-ws.c b/ui/vnc-ws.c index e304baf..d75950d 100644 --- a/ui/vnc-ws.c +++ b/ui/vnc-ws.c @@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState = *vs, const char* key) } =20 response =3D 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)); =20 g_free(accept); g_free(response); --=20 1.9.3 (Apple Git-50)