[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v12 05/13] Add uleb encoding/decoding functions
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v12 05/13] Add uleb encoding/decoding functions |
Date: |
Tue, 19 Jun 2012 10:59:21 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
On 06/19/2012 09:43 AM, Orit Wasserman wrote:
> Implement Unsigned Little Endian Base 128.
>
> Signed-off-by: Orit Wasserman <address@hidden>
> ---
> 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 address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v12 00/13] XBZRLE delta for live migration of large memory app, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 01/13] Add MigrationParams structure, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 03/13] Add XBZRLE documentation, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 02/13] Add migration capabilites, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 05/13] Add uleb encoding/decoding functions, Orit Wasserman, 2012/06/19
- Re: [Qemu-devel] [PATCH v12 05/13] Add uleb encoding/decoding functions,
Eric Blake <=
- [Qemu-devel] [PATCH v12 04/13] Add cache handling functions, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 06/13] Add save_block_hdr function, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 07/13] Add debugging infrastructure, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 11/13] Add XBZRLE to ram_save_block and ram_save_live, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 13/13] Add XBZRLE statistics, Orit Wasserman, 2012/06/19
- [Qemu-devel] [PATCH v12 12/13] Add set_cachesize command, Orit Wasserman, 2012/06/19