On 06/19/2012 09:43 AM, Orit Wasserman wrote: > Implement Unsigned Little Endian Base 128. > > Signed-off-by: Orit Wasserman <owass...@redhat.com> > --- > cutils.c | 29 +++++++++++++++++++++++++++++ > qemu-common.h | 8 ++++++++ > 2 files changed, 37 insertions(+), 0 deletions(-) >
> +int uleb128_decode_small(const uint8_t *in, uint32_t *n) > +{ > + if (!(*in & 0x80)) { > + *n = *in++; > + return 1; > + } else { > + *n = *in++ & 0x7f; > + g_assert(!(*in & 0x80)); Are we really okay calling g_assert() in the middle of an incoming migration, or are there more graceful ways to fail when dealing with invalid user input? -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature