From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54483 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvQo4-0007Uk-Ga for qemu-devel@nongnu.org; Fri, 04 Mar 2011 03:56:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvQo2-0005rC-VV for qemu-devel@nongnu.org; Fri, 04 Mar 2011 03:56:16 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:50931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvQo2-0005pH-QR for qemu-devel@nongnu.org; Fri, 04 Mar 2011 03:56:14 -0500 Received: by ewy24 with SMTP id 24so677035ewy.4 for ; Fri, 04 Mar 2011 00:56:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4D709619.5020103@msgid.tls.msk.ru> References: <1299200265-32685-1-git-send-email-roland@kernel.org> <4D709619.5020103@msgid.tls.msk.ru> Date: Fri, 4 Mar 2011 09:56:12 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH] vnc: tight: Fix crash after 2GB of output From: Corentin Chary Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Roland Dreier , Roland Dreier , qemu-devel@nongnu.org >> >> =C2=A0 =C2=A0 bytes =3D zstream->total_out - previous_out; Good catch > total_out isn't used by zlib internally, so if the resulting > "total" counter is not needed in qemu, we can just zero-out > the total_out in this function before calling zlib, and > use the resulting value directly as "bytes", without > saving its previous value in previous_out. =C2=A0Something like > the attached patch does. If you're certain that total_out is not used by zlib, could you also send a patch for zlib encoding please ? (vnc-enc-zlib.c) Thanks, --=20 Corentin Chary http://xf.iksaif.net