[Qemu-devel] [PULL 24/25] util/main-loop: Fix incorrect assertion

2019-06-21 Thread Paolo Bonzini
From: Lidong Chen The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i is in [0, w->num). This could happen with a very high number

[Qemu-devel] [PULL 24/25] util/main-loop: Fix incorrect assertion

2019-06-20 Thread Paolo Bonzini
From: Lidong Chen The check for poll_fds in g_assert() was incorrect. The correct assertion should check "n_poll_fds + w->num <= ARRAY_SIZE(poll_fds)" because the subsequent for-loop is doing access to poll_fds[n_poll_fds + i] where i is in [0, w->num). This could happen with a very high number