2009-01-01 Andreas Schwab <schwab@suse.de>

* net.c (sys_accept): Properly decode third argument as pointer to
	int.
This commit is contained in:
Дмитрий Левин 2009-01-01 22:47:51 +00:00
parent ecfe2f19f9
commit 2fc6615b91
2 changed files with 10 additions and 3 deletions

View File

@ -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.

8
net.c
View File

@ -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;
}