On 07/04/2012 01:24 AM, Orit Wasserman wrote:
>>
>>> + ret = uleb128_decode_small(src + i, &count);
>>> + if (ret < 0) {
>>
>> An nzrun should be a non-zero value; I'd write this as (ret <= 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 -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
