mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
36617792b4
commit
ffa99afd6e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue