[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] util/id: fully allocate names table
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2] util/id: fully allocate names table |
Date: |
Wed, 25 Nov 2015 14:07:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/25/2015 02:03 PM, John Snow wrote:
> Trivial: this array should be allocated to have ID_MAX entries always.
> Otherwise if someone were to forget to expand this table, the assertion
> in the id generator won't actually trigger; it will read junk data.
>
> v2: Fix the range assertion, too. Compare against the known actual size
> of the table instead of what it "should" be.
The v2 blurb would normally appear after the ---; it can be removed by
the maintainer.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> util/id.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature