aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-13 16:58:44 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-13 16:58:44 +0100
commit20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46 (patch)
treefadb1ea5e817287cd872b18ea0e597ece952dc00 /ui
parent5c65b1f135ff09d24827fa3a17e56a4f8a032cd5 (diff)
parent631009e775a91018a62e2670b4473e99916f858f (diff)
downloadqemu-20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46.zip
qemu-20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46.tar.gz
qemu-20c1df5476e1e9b5d3f5b94f9f3ce01d21f14c46.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20200713-pull-request' into staging
bugfixes for audio, usb, ui and docs. # gpg: Signature made Mon 13 Jul 2020 15:10:35 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/fixes-20200713-pull-request: usb: fix usb-host build on windows. ui: fix vc_chr_write call in text_console_do_init docs/qdev-device-use: Clean up the sentences related to -usbdevice ossaudio: fix out of bounds write Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/console.c b/ui/console.c
index 08f75c9..0579be7 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2184,12 +2184,12 @@ static void text_console_do_init(Chardev *chr, DisplayState *ds)
text_console_resize(s);
if (chr->label) {
- char msg[128];
- int len;
+ char *msg;
s->t_attrib.bgcol = QEMU_COLOR_BLUE;
- len = snprintf(msg, sizeof(msg), "%s console\r\n", chr->label);
- vc_chr_write(chr, (uint8_t *)msg, len);
+ msg = g_strdup_printf("%s console\r\n", chr->label);
+ vc_chr_write(chr, (uint8_t *)msg, strlen(msg));
+ g_free(msg);
s->t_attrib = s->t_attrib_default;
}