aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-11-01 10:33:45 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-11-01 10:33:45 -0500
commit4f25ac5f425d435d0c841ab876adfb541cb521a3 (patch)
tree1063e8928010df0492f8f2c38bfd857afcfc6717 /arch_init.c
parent9fe5497c4f5425c6d593c3f038e8e5bffc32edd6 (diff)
parentb907b69dd75415bc28349d1dd1e9a598ddace463 (diff)
Merge remote branch 'mst/for_anthony' into staging
Diffstat (limited to 'arch_init.c')
-rw-r--r--arch_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch_init.c b/arch_init.c
index cea3c8b1cb..44869255ef 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -390,6 +390,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
host = qemu_get_ram_ptr(addr);
else
host = host_from_stream_offset(f, addr, flags);
+ if (!host) {
+ return -EINVAL;
+ }
ch = qemu_get_byte(f);
memset(host, ch, TARGET_PAGE_SIZE);