diff options
author | Orit Wasserman <owasserm@redhat.com> | 2012-06-19 11:51:37 +0300 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2012-06-29 10:38:28 +0200 |
commit | 0ff1f9f585712684dc46cb6cb6a46a8cc160b2ae (patch) | |
tree | b85c1a9f3d85af4168d7ebaed97267bfdd2e3d13 | |
parent | 71ea2e016131a9fcde6f1ffd3e0e34a64c21f593 (diff) | |
download | qemu-0ff1f9f585712684dc46cb6cb6a46a8cc160b2ae.tar.gz qemu-0ff1f9f585712684dc46cb6cb6a46a8cc160b2ae.tar.bz2 qemu-0ff1f9f585712684dc46cb6cb6a46a8cc160b2ae.zip |
Add missing check for host_from_stream_offset return value for RAM_SAVE_FLAG_PAGE
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
-rw-r--r-- | arch_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch_init.c b/arch_init.c index a9e8b7442b..81c2e5443f 100644 --- a/arch_init.c +++ b/arch_init.c @@ -483,6 +483,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id) void *host; host = host_from_stream_offset(f, addr, flags); + if (!host) { + return -EINVAL; + } qemu_get_buffer(f, host, TARGET_PAGE_SIZE); } |