ivhsmem: read do not accept more than sizeof(long)

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.

A following patch will change the protocol to 64-bit little-endian
instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
This commit is contained in:
Marc-André Lureau 2015-06-19 13:00:32 +02:00
parent c246a62f26
commit b8ab854b27
1 changed files with 1 additions and 1 deletions

View File

@ -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)