From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Jorge Acereda Maciá" <jacereda@gmail.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Anthony Liguori" <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 3/3] Fix crash when connecting to VNC through websocket
Date: Tue, 10 Mar 2015 12:16:25 +0100 [thread overview]
Message-ID: <1425986185-28637-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1425986185-28637-1-git-send-email-kraxel@redhat.com>
From: Jorge Acereda Maciá <jacereda@gmail.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 <jacereda@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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)
}
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);
--
1.8.3.1
next prev parent reply other threads:[~2015-03-10 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 11:16 [Qemu-devel] [PULL 0/3] vnc patch queue Gerd Hoffmann
2015-03-10 11:16 ` [Qemu-devel] [PULL 1/3] vnc: set id at parse time not init time Gerd Hoffmann
2015-03-10 11:16 ` [Qemu-devel] [PULL 2/3] vnc: -readconfig fix Gerd Hoffmann
2015-03-10 11:16 ` Gerd Hoffmann [this message]
2015-03-11 8:44 ` [Qemu-devel] [PULL 0/3] vnc patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425986185-28637-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=jacereda@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).