From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkwZV-0005Gv-V2 for qemu-devel@nongnu.org; Tue, 08 Sep 2009 05:01:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkwZQ-00055v-4F for qemu-devel@nongnu.org; Tue, 08 Sep 2009 05:01:05 -0400 Received: from [199.232.76.173] (port=49668 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkwZP-00055N-Ow for qemu-devel@nongnu.org; Tue, 08 Sep 2009 05:00:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34890) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MkwZO-0004he-Vp for qemu-devel@nongnu.org; Tue, 08 Sep 2009 05:00:59 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8890tWG015062 for ; Tue, 8 Sep 2009 05:00:55 -0400 Received: from localhost (vpn-12-51.rdu.redhat.com [10.11.12.51]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8890ZPw021158 for ; Tue, 8 Sep 2009 05:00:50 -0400 Date: Tue, 8 Sep 2009 14:30:12 +0530 From: Amit Shah Message-ID: <20090908090012.GA3751@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] vnc: client_cut_text regression List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list Hello, client_cut_text, which is called from protocol_client_msg(), only gets valid buffers the datalen is <= 19999. For values above that, it's called with the len as 0. It's easy to reproduce: since client_cut_text doesn't do anything yet, just put an fprintf with the len that was passed in the client_cut_text() function and try copying some values to the clipboard on the host with the vncviewer open. Watch for the printfs. I couldn't track down the regression to any recent commits in vnc.c; I remember it working about a month ago though. Enabling debug shows some messages (len xxxx is mine in client_cut_text) which show there's no data in the len=20000 (which prints out as len=0) case. I also tried with an older vnc client to check if it was a regression in the vncviewer; got the same behaviour there as well. VNC_DEBUG=1 Wrote wire 0x2649440 1830 -> 1830 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 10 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 4096 Read plain 0x2207800 size 20480 offset 4096 Read wire 0x2208800 4096 -> 4096 Read plain 0x2207800 size 20480 offset 8192 Read wire 0x2209800 4096 -> 4096 Read plain 0x2207800 size 20480 offset 12288 Read wire 0x220a800 4096 -> 4096 Read plain 0x2207800 size 20480 offset 16384 Read wire 0x220b800 4096 -> 3623 len 19999 Wrote wire 0x2649440 430 -> 430 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 10 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 6 Wrote wire 0x2649440 1797 -> 1797 Wrote wire 0x2649440 1334 -> 1334 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 10 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 8 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 8 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 8 len 0 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 6 Wrote wire 0x2649440 1330 -> 1330 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 10 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 6 Read plain 0x2207800 size 20480 offset 0 Read wire 0x2207800 4096 -> 6 Wrote wire 0x2649440 1328 -> 1328 Amit