[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] Allow setting up to 8 bytes with the generic loader
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/1] Allow setting up to 8 bytes with the generic loader |
Date: |
Thu, 20 Jan 2022 11:16:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
On 1/20/22 10:27, Petr Tesarik wrote:
> The documentation for the generic loader says that "the maximum size of
> the data is 8 bytes". However, attempts to set data-len=8 trigger the
> following assertion failure:
>
> ../hw/core/generic-loader.c:59: generic_loader_reset: Assertion `s->data_len
> < sizeof(s->data)' failed.
>
> The type of s->data is uint64_t (i.e. 8 bytes long), so I believe this
> assert should use <= instead of <.
>
> Fixes: e481a1f63c93 ("generic-loader: Add a generic loader")
> Signed-off-by: Petr Tesarik <ptesarik@suse.com>
> ---
> hw/core/generic-loader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>