igvm: fix off by one bug in memmap entry count checking
Fixes: c1d466d267 ("backends/igvm: Add IGVM loader and configuration")
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20251029105555.2492276-3-kraxel@redhat.com>
This commit is contained in:
parent
451e7b7aa7
commit
dd020b4e6b
1 changed files with 1 additions and 1 deletions
|
|
@ -567,7 +567,7 @@ static int qigvm_directive_memory_map(QIgvm *ctx, const uint8_t *header_data,
|
|||
|
||||
retval = ctx->cgsc->get_mem_map_entry(entry, &cgmm_entry, errp);
|
||||
while (retval == 0) {
|
||||
if (entry > max_entry_count) {
|
||||
if (entry >= max_entry_count) {
|
||||
error_setg(
|
||||
errp,
|
||||
"IGVM: guest memory map size exceeds parameter area defined in IGVM file");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue