From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmAoc-0002n7-GH for qemu-devel@nongnu.org; Tue, 03 Jul 2012 17:39:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmAoa-0006Ir-No for qemu-devel@nongnu.org; Tue, 03 Jul 2012 17:39:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmAoa-0006IF-BY for qemu-devel@nongnu.org; Tue, 03 Jul 2012 17:39:20 -0400 Message-ID: <4FF3667B.50106@redhat.com> Date: Tue, 03 Jul 2012 15:39:07 -0600 From: Eric Blake MIME-Version: 1.0 References: <1341323574-23206-1-git-send-email-owasserm@redhat.com> <1341323574-23206-11-git-send-email-owasserm@redhat.com> <4FF364D8.4020407@redhat.com> In-Reply-To: <4FF364D8.4020407@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig0605A9B7B9112EE3241508F3" Subject: Re: [Qemu-devel] [PATCH v14 10/13] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, Petter Svard , stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, Orit Wasserman , chegu_vinod@hp.com, Benoit Hudzia , avi@redhat.com, pbonzini@redhat.com, Aidan Shribman This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0605A9B7B9112EE3241508F3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/03/2012 03:32 PM, Eric Blake wrote: >> + ret =3D uleb128_decode_small(src + i, &count); >> + if (ret < 0) { >=20 > An nzrun should be a non-zero value; I'd write this as (ret <=3D 0) to > rule out an attempt to pass a zero-length nzrun. Correcting myself, if (ret < 0 || !count) { At this point, I think I will just bite the bullet and post a version of this code that incorporates my review. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig0605A9B7B9112EE3241508F3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP82Z7AAoJEKeha0olJ0Nq5y8H/1piNza5jAdCywX1Oo9biM3Q bnqfy287OIuKgS7vrxQ8/mhi7MD4ttPiREqbvrVEiD3PnJiuWO5MurWta59t6iAE LqbkwGS6m54JRp0XNbBR7Fau7x+jObfZS/6tnck6jq2mw85vCGVKN1RIwq6plGDE dVIp/O95+iKENYDvUg3RdTS2143sbFkfteSj/Kzs2vDPZ5BmrsRqOHR/zFTR6DRC GpYJGjh47UhcMr3UV8OYHlCg3fbl+cbRRZ/1AhFpit2/cnXRcaA/VZxj5ZpMTXAM 07ZRNd0timJojy/Yd1bOg+RA92fvHxuYklOzmZ9cTyhHnApQWgmKGvBglmmOJyM= =ixG/ -----END PGP SIGNATURE----- --------------enig0605A9B7B9112EE3241508F3--