[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than size
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long) |
Date: |
Tue, 15 Sep 2015 18:07:20 +0200 |
From: Marc-André Lureau <address@hidden>
ivshmem_read() only reads sizeof(long) from the input buffer. Accepting
more could lead to fifo8 abort() on 32bit systems if fifo is not empty.
Signed-off-by: Marc-André Lureau <address@hidden>
---
hw/misc/ivshmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index cc76989..fb53b3f 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -272,7 +272,7 @@ static void ivshmem_receive(void *opaque, const uint8_t
*buf, int size)
static int ivshmem_can_receive(void * opaque)
{
- return 8;
+ return sizeof(long);
}
static void ivshmem_event(void *opaque, int event)
--
2.4.3
- [Qemu-devel] [PATCH v3 00/46] ivshmem improvements (please review), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 01/46] char: add qemu_chr_free(), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 02/46] msix: add VMSTATE_MSIX_TEST, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long),
marcandre . lureau <=
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Claudio Fontana, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Marc-André Lureau, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Claudio Fontana, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Marc-André Lureau, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Paolo Bonzini, 2015/09/16
- Re: [Qemu-devel] [PATCH v3 03/46] ivhsmem: read do not accept more than sizeof(long), Claudio Fontana, 2015/09/16
[Qemu-devel] [PATCH v3 04/46] ivshmem: fix number of bytes to push to fifo, marcandre . lureau, 2015/09/15
[Qemu-devel] [PATCH v3 05/46] ivshmem: factor out the incoming fifo handling, marcandre . lureau, 2015/09/15