[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/39] ivhsmem: read do not accept more than sizeof(
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 03/39] ivhsmem: read do not accept more than sizeof(long) |
Date: |
Fri, 26 Jun 2015 16:49:09 +0200 |
ivshmem_read() only reads sizeof(long) from the input buffer. Accepting
more could lead to fifo8 abort() on x86 if it's 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 00/39] ivshmem server/client, cleanups & test, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 01/39] char: add qemu_chr_free(), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 02/39] msix: add VMSTATE_MSIX_TEST, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 04/39] ivshmem: fix number of bytes to push to fifo, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 05/39] ivshmem: factor out the incoming fifo handling, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 03/39] ivhsmem: read do not accept more than sizeof(long),
Marc-André Lureau <=
- [Qemu-devel] [PATCH 07/39] ivshmem: remove superflous ivshmem_attr field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 08/39] ivshmem: remove useless doorbell field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 06/39] ivshmem: remove unnecessary dup(), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 09/39] ivshmem: more qdev conversion, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 10/39] ivshmem: remove last exit(1), Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 11/39] ivshmem: increase_dynamic_storage() improvements, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 13/39] ivshmem: initialize max_peer to -1, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 12/39] ivshmem: remove useless ivshmem_update_irq() val argument, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 14/39] ivshmem: remove max_peer field, Marc-André Lureau, 2015/06/26
- [Qemu-devel] [PATCH 15/39] ivshmem: improve debug messages, Marc-André Lureau, 2015/06/26