aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-11-21 18:25:15 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-01-10 08:14:20 +0100
commit97efe4f961dcf5a0126baa75e8a6bff66d33186f (patch)
treed415f75ae7bef75a14d4dc4f9f7bd7e3885a50c9 /arch_init.c
parentc952b71582e2e4be286087ad34de5e3ec1b8d974 (diff)
ui/vnc: Fix problem with sending too many bytes as server name
If the buffer is not big enough, snprintf() does not return the number of bytes that have been written to the buffer, but the number of bytes that would be needed for writing the whole string. By using this value for the following vnc_write() calls, we send some junk at the end of the name in case the qemu_name is longer than 1017 bytes, which could confuse the VNC clients. Fix this by adding an additional size check here. Buglink: https://bugs.launchpad.net/qemu/+bug/1637447 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1479749115-21932-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'arch_init.c')
0 files changed, 0 insertions, 0 deletions