mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
+1
-1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user