From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmNtC-0006w7-Hn for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmNt6-0003td-By for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:36:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmNt6-0003tI-3s for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:36:52 -0400 Message-ID: <4FF42AC5.6000207@redhat.com> Date: Wed, 04 Jul 2012 05:36:37 -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> <4FF3EFBC.7020402@redhat.com> In-Reply-To: <4FF3EFBC.7020402@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA8B449E4430024592D8A504C" 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: , To: Orit Wasserman Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, Petter Svard , Benoit Hudzia , avi@redhat.com, Aidan Shribman , pbonzini@redhat.com, chegu_vinod@hp.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA8B449E4430024592D8A504C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/04/2012 01:24 AM, Orit Wasserman wrote: >> >>> + ret =3D uleb128_decode_small(src + i, &count); >>> + if (ret < 0) { >> >> 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. > decode can only return -1 (invalid) or the decoded len 1 or 2 > so maybe you meant I should check that count is bigger than zero? Yes, and I even corrected myself: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg00368.html as well as incorporated my comments (which probably picked up a couple other fixes in the process): https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg00369.html --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA8B449E4430024592D8A504C 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/ iQEcBAEBCAAGBQJP9CrFAAoJEKeha0olJ0NqYGcH/jiaTa1GQs4NmQWVWW2/Khpr l79Yqd5aOymAN1J8tMrRfin5JXmjTaCtsA4Uhem/eAPlAKANmHY6Nr8ugZq4X+r0 dPvu8hSs+ZIO3wwFEts0N+H54OISPTkyNhTbFPp1xrsxZ6jvV2W+v5j9FPbt8ij8 /xYr4FuOJTx8c8sKqDlJQJ7EoNejSafFY03VSdA3me5tJr16qfNLwcX/eeRdAmZf qZtpb+QYkgxZsrW+KR64Ocp0u9WzLAaC//x38H0xnCUnQAq2BDBXOV71OcmkyEv8 +qDIemA2yBYpfkg8ZlxRxYqwOa4uvZbZSJcLcJEKrWJYF1beOX+IT7HNnZozuHk= =g4wI -----END PGP SIGNATURE----- --------------enigA8B449E4430024592D8A504C--