From: "Michael R. Hines" <mrhi...@us.ibm.com> We were not checking for a valid 'bytes_sent' pointer before accessing it.
Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Michael R. Hines <mrhi...@us.ibm.com> --- savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index e0491e7..03fc4d9 100644 --- a/savevm.c +++ b/savevm.c @@ -662,7 +662,7 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset, offset, size, bytes_sent); if (ret != RAM_SAVE_CONTROL_DELAYED) { - if (*bytes_sent > 0) { + if (bytes_sent && *bytes_sent > 0) { qemu_update_position(f, *bytes_sent); } else if (ret < 0) { qemu_file_set_error(f, ret); -- 1.7.10.4