Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Markus Armbruster
Eric Blake writes: > On 5/14/19 8:15 AM, Yury Kotov wrote: >> monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() >> returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to >> a bug with removing fd from fdset which id >= 2^32. >> So, fix return types for

Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Yury Kotov
14.05.2019, 17:05, "Eric Blake" : > On 5/14/19 8:15 AM, Yury Kotov wrote: >>  monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() >>  returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads >> to >>  a bug with removing fd from fdset which id >= 2^32. >>  So, fix

Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Eric Blake
On 5/14/19 8:15 AM, Yury Kotov wrote: > monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() > returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to > a bug with removing fd from fdset which id >= 2^32. > So, fix return types for these function. fd's cannot

Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Markus Armbruster
Yury Kotov writes: > monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() > returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to Grammar nits: s/returns/return/ s/Downcast/Downcasting/ > a bug with removing fd from fdset which id >= 2^32.

[Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Yury Kotov
monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to a bug with removing fd from fdset which id >= 2^32. So, fix return types for these function. Signed-off-by: Yury Kotov --- include/monitor/monitor.h |