[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] cpu: assert host pointer offset within block
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH 3/4] cpu: assert host pointer offset within block |
Date: |
Wed, 12 Nov 2014 11:44:44 +0200 |
Make accesses safer in case we missed some
check somewhere.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/exec/cpu-all.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 9d8d408..7c3a5e7 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -315,6 +315,7 @@ typedef struct RAMBlock {
static inline void *ramblock_ptr(RAMBlock *block, ram_addr_t offset)
{
+ assert(offset < block->length);
return (char *)block->host + offset;
}
--
MST
[Qemu-devel] [PATCH 3/4] cpu: assert host pointer offset within block,
Michael S. Tsirkin <=
[Qemu-devel] [PATCH 4/4] cpu: verify that block->host is set, Michael S. Tsirkin, 2014/11/12
Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Amit Shah, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Michael S. Tsirkin, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Amit Shah, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Michael S. Tsirkin, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Amit Shah, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Michael S. Tsirkin, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Amit Shah, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Michael S. Tsirkin, 2014/11/17
- Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840, Amit Shah, 2014/11/18