We receive that value over the network, and ram_addr_t depends of
architecture.  Just make enough space for 64bit.

Signed-off-by: Juan Quintela <quint...@redhat.com>
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/ram.c b/migration/ram.c
index b9147bcca3..d003538f06 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1236,7 +1236,7 @@ int multifd_save_setup(void)
         p->id = i;
         p->pages = multifd_pages_init(page_count);
         p->packet_len = sizeof(MultiFDPacket_t)
-                      + sizeof(ram_addr_t) * page_count;
+                      + sizeof(uint64_t) * page_count;
         p->packet = g_malloc0(p->packet_len);
         p->packet->magic = cpu_to_be32(MULTIFD_MAGIC);
         p->packet->version = cpu_to_be32(MULTIFD_VERSION);
-- 
2.24.1


Reply via email to