diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-10-01 21:49:30 +0530 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-10-25 23:25:48 +0200 |
commit | 2f4d0f5990ede025720e41fa473029e9ca85e8b8 (patch) | |
tree | d7fd68ed9ae6588ef11c7a5d95f85a701183a300 /cpus.c | |
parent | 4b4d4a21b988f6d56e0792058aa0b968e19fda6b (diff) | |
download | hqemu-2f4d0f5990ede025720e41fa473029e9ca85e8b8.zip hqemu-2f4d0f5990ede025720e41fa473029e9ca85e8b8.tar.gz |
target-ppc: Check for error on address translation in memsave command
When we translate the virtual address to physical check for error.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1403,7 +1403,10 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename, l = sizeof(buf); if (l > size) l = size; - cpu_memory_rw_debug(cpu, addr, buf, l, 0); + if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) { + error_setg(errp, "Invalid addr 0x%016" PRIx64 "specified", addr); + goto exit; + } if (fwrite(buf, 1, l, f) != l) { error_set(errp, QERR_IO_ERROR); goto exit; |