qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/vnc: Fix problem with sending too many bytes


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] ui/vnc: Fix problem with sending too many bytes as server name
Date: Mon, 21 Nov 2016 18:51:10 +0100

On Mo, 2016-11-21 at 18:25 +0100, Thomas Huth wrote:
> 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.

Use g_strdup_printf instead?

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]