All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole
Date: Tue,  9 Feb 2016 11:59:16 +0100	[thread overview]
Message-ID: <1455015557-15106-2-git-send-email-pbonzini@redhat.com> (raw)

Only the echo field is used in the temporary VirtualConsole, so the
damage was limited.  But still, if echo was incorrectly set to true,
the result would be some puzzling output in VTE monitor and serial
consoles.

Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd
Cc: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 2b46965..3773826 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1613,7 +1613,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp)
     chr->chr_set_echo = gd_vc_chr_set_echo;
 
     /* Temporary, until gd_vc_vte_init runs.  */
-    chr->opaque = g_new(VirtualConsole, 1);
+    chr->opaque = g_new0(VirtualConsole, 1);
 
     /* defer OPENED events until our vc is fully initialized */
     chr->explicit_be_open = true;
-- 
2.5.0

             reply	other threads:[~2016-02-09 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 10:59 Paolo Bonzini [this message]
2016-02-16 13:32 ` [Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole Gerd Hoffmann

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=1455015557-15106-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.