Check if name is NULL before we strcmp the syscall name. This was
sometimes triggered if you began trussing a process while it was in a syscall, as the name is filled in when the syscall is made.
This commit is contained in:
parent
40276eb1ea
commit
967706f308
@ -412,7 +412,7 @@ print_syscall(struct trussinfo *trussinfo, const char *name, int nargs, char **s
|
||||
if (trussinfo->flags & FOLLOWFORKS)
|
||||
len += fprintf(trussinfo->outfile, "%5d: ", trussinfo->pid);
|
||||
|
||||
if (!strcmp(name, "execve") || !strcmp(name, "exit")) {
|
||||
if (name != NULL && (!strcmp(name, "execve") || !strcmp(name, "exit"))) {
|
||||
clock_gettime(CLOCK_REALTIME, &trussinfo->after);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user