summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-04-17 14:33:59 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-04-17 14:33:59 +0000
commite51ce47b1158e8424eee314ca2f3731881355eec (patch)
tree42ecd0427f451da641b806e194c209ae991c47e9
parentfb7ae846c66a70589ba68943680751f13a38663c (diff)
downloadstrace-e51ce47b1158e8424eee314ca2f3731881355eec.tar.gz
strace-e51ce47b1158e8424eee314ca2f3731881355eec.tar.bz2
strace-e51ce47b1158e8424eee314ca2f3731881355eec.tar.xz
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>
-rw-r--r--desc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/desc.c b/desc.c
index 0686bf4..a180f88 100644
--- a/desc.c
+++ b/desc.c
@@ -731,11 +731,15 @@ sys_epoll_ctl(struct tcb *tcp)
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;