diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2009-01-01 22:47:51 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2009-06-02 16:29:03 -0700 |
commit | fb991f69229256acc4b4d65202eced15741db864 (patch) | |
tree | 769b6a16d7bfaf56104b0b289bb75c4da4b83fb9 | |
parent | 78c16f7763b1d7f33d0b9465c61477276ce529a2 (diff) | |
download | strace-fb991f69229256acc4b4d65202eced15741db864.tar.gz |
2009-01-01 Andreas Schwab <schwab@suse.de>
* net.c (sys_accept): Properly decode third argument as pointer to
int.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | net.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2009-01-01 Andreas Schwab <schwab@suse.de> + + * net.c (sys_accept): Properly decode third argument as pointer to + int. + 2008-12-30 Denys Vlasenko <dvlasenk@redhat.com> Experimental support for -D option. @@ -1315,13 +1315,15 @@ struct tcb *tcp; } else if (!tcp->u_arg[2]) tprintf("%#lx, NULL", tcp->u_arg[1]); else { - if (tcp->u_arg[1] == 0 || syserror(tcp)) { + int len; + if (tcp->u_arg[1] == 0 || syserror(tcp) + || umove (tcp, tcp->u_arg[2], &len) < 0) { tprintf("%#lx", tcp->u_arg[1]); } else { - printsock(tcp, tcp->u_arg[1], tcp->u_arg[2]); + printsock(tcp, tcp->u_arg[1], len); } tprintf(", "); - printnum(tcp, tcp->u_arg[2], "%lu"); + printnum_int(tcp, tcp->u_arg[2], "%u"); } return 0; } |