summaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-06-23 13:34:09 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-24 18:02:49 +0200
commitffa99afd6e4d354cdfae44cc43a2ca7ef056eb35 (patch)
tree5d14d23bc82009dc9ac439e9af3e94b362335dbd /hw/misc
parent36617792b45b5d46d574af4f6ebb3f35c77d1e69 (diff)
downloadqemu-ffa99afd6e4d354cdfae44cc43a2ca7ef056eb35.tar.gz
ivshmem: print error on invalid peer id
The server shouldn't send invalid peer id, so print an error if it's the case. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/ivshmem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index d7a00bd383..6ee4881997 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -399,6 +399,7 @@ static void close_guest_eventfds(IVShmemState *s, int posn)
return;
}
if (posn < 0 || posn >= s->nb_peers) {
+ error_report("invalid peer %d", posn);
return;
}