From 854f63d44065567c2991b5050f7d4011ca985c4e Mon Sep 17 00:00:00 2001 From: Yury Kotov Date: Thu, 23 May 2019 12:44:33 +0300 Subject: monitor: Fix return type of monitor_fdset_dup_fd_find monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() return mon_fdset->id which is int64_t. Downcasting from int64_t to int leads to a bug with removing fd from fdset with id >= 2^32. So, fix return types for these function. Signed-off-by: Yury Kotov Reviewed-by: Markus Armbruster Message-Id: <20190523094433.30297-1-yury-kotov@yandex-team.ru> Signed-off-by: Markus Armbruster --- stubs/fdset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stubs') diff --git a/stubs/fdset.c b/stubs/fdset.c index f3d9980..67dd5e1 100644 --- a/stubs/fdset.c +++ b/stubs/fdset.c @@ -6,7 +6,7 @@ int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd) return -1; } -int monitor_fdset_dup_fd_find(int dup_fd) +int64_t monitor_fdset_dup_fd_find(int dup_fd) { return -1; } -- cgit v1.1