Add missing check for host_from_stream_offset return value for RAM_SAVE_FLAG_PAGE

Signed-off-by: Orit Wasserman <[email protected]>
diff --git a/arch_init.c b/arch_init.c
index a9e8b74..81c2e54 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -483,6 +483,9 @@
             void *host;
 
             host = host_from_stream_offset(f, addr, flags);
+            if (!host) {
+                return -EINVAL;
+            }
 
             qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
         }