mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106712
@ -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…
Reference in New Issue
Block a user