From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c03Ze-00049D-1q for qemu-devel@nongnu.org; Fri, 28 Oct 2016 05:35:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c03ZZ-0002OX-4v for qemu-devel@nongnu.org; Fri, 28 Oct 2016 05:35:42 -0400 Received: from indium.canonical.com ([91.189.90.7]:37559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c03ZY-0002OM-V3 for qemu-devel@nongnu.org; Fri, 28 Oct 2016 05:35:37 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1c03ZX-0003Mo-Lg for ; Fri, 28 Oct 2016 09:35:35 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 503B22E80CB for ; Fri, 28 Oct 2016 09:35:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 28 Oct 2016 09:30:31 -0000 From: cardamon <1637447@bugs.launchpad.net> Reply-To: Bug 1637447 <1637447@bugs.launchpad.net> Sender: bounces@canonical.com Message-Id: <20161028093031.16469.50340.malonedeb@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1637447] [NEW] VNC/RFB: QEMU reports incorrect name (length) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: If the name of a machine (as set with the -name argument) has a length longer than 1024, (RFB) VNC clients will not receive a correct RFB ServerInit message. I suspect this is the problem: https://github.com/qemu/qemu/blob/master/ui/vnc.c#L2463 The return value of snprintf is used as the value for the name-length field= in the ServerInit message. This is problematic for names that were truncated to 1024, as the length wi= ll now be bigger than the actual name. I think a quick fix would be to simply report min(size,1024) to the client... ** Affects: qemu Importance: Undecided Status: New ** Tags: rfb vnc -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1637447 Title: VNC/RFB: QEMU reports incorrect name (length) Status in QEMU: New Bug description: If the name of a machine (as set with the -name argument) has a length longer than 1024, (RFB) VNC clients will not receive a correct RFB ServerInit message. I suspect this is the problem: https://github.com/qemu/qemu/blob/master/ui/vnc.c#L2463 The return value of snprintf is used as the value for the name-length fie= ld in the ServerInit message. This is problematic for names that were truncated to 1024, as the length = will now be bigger than the actual name. I think a quick fix would be to simply report min(size,1024) to the client... To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1637447/+subscriptions