Fix truss so that it doesn't abort/exit when a syscall has been given
a NULL-pointer for a sockaddr argument.
This commit is contained in:
parent
3f741ca117
commit
a7a08c7e63
@ -365,6 +365,11 @@ print_arg(int fd, struct syscall_args *sc, unsigned long *args) {
|
||||
u_char *q;
|
||||
int i;
|
||||
|
||||
if (args[sc->offset] == 0) {
|
||||
asprintf(&tmp, "NULL");
|
||||
break;
|
||||
}
|
||||
|
||||
/* yuck: get ss_len */
|
||||
if (get_struct(fd, (void *)args[sc->offset], (void *)&ss,
|
||||
sizeof(ss.ss_len) + sizeof(ss.ss_family)) == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user