epoll_ctl: fix EPOLL_CTL_DEL argument decoding
* desc.c (sys_epoll_ctl): Do not parse the event structure for
EPOLL_CTL_DEL operation.
Reported-by: Марк Коренберг <socketpair@gmail.com>
diff --git a/desc.c b/desc.c
index 0686bf4..a180f88 100644
--- a/desc.c
+++ b/desc.c
@@ -731,11 +731,15 @@
else {
#ifdef HAVE_SYS_EPOLL_H
struct epoll_event ev;
- if (umove(tcp, tcp->u_arg[3], &ev) == 0)
+ if (
+#ifdef EPOLL_CTL_DEL
+ (tcp->u_arg[1] != EPOLL_CTL_DEL) &&
+#endif
+ umove(tcp, tcp->u_arg[3], &ev) == 0)
print_epoll_event(&ev);
else
#endif
- tprints("{...}");
+ tprintf("%lx", tcp->u_arg[3]);
}
}
return 0;