mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 11:20:58 +01:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121606
@ -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