On 07/24/2018 10:59 AM, Dr. David Alan Gilbert wrote:
* Peter Xu (pet...@redhat.com) wrote:
I would guess it won't happen normally, but this should ease Coverity.
+++ b/migration/ram.c
@@ -851,7 +851,7 @@ static void multifd_send_pages(void)
p->pages->block = NULL;
multifd_send_state->pages = p->pages;
p->pages = pages;
- transferred = pages->used * TARGET_PAGE_SIZE + p->packet_len;
+ transferred = ((uint64_t) pages->used) * TARGET_PAGE_SIZE + p->packet_len;
The outer () are not strictly necessary, as casts bind tighter than
multiply.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org