diff options
author | alfred <alfred@FreeBSD.org> | 2004-08-08 23:29:36 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2004-08-08 23:29:36 +0000 |
commit | 46edc34b3dc769386ff74b79a8bb24b8cea4eaec (patch) | |
tree | de34f99c74bd7fe4f030c53d75408e33ceca171f /usr.bin | |
parent | 9c026741d82b7c5b820c5d71f95c634b458a5bb0 (diff) | |
download | FreeBSD-src-46edc34b3dc769386ff74b79a8bb24b8cea4eaec.zip FreeBSD-src-46edc34b3dc769386ff74b79a8bb24b8cea4eaec.tar.gz |
don't seg if the syscall is invalid for i386fbsd.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/truss/amd64-fbsd32.c | 3 | ||||
-rw-r--r-- | usr.bin/truss/i386-fbsd.c | 3 | ||||
-rw-r--r-- | usr.bin/truss/syscalls.c | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/truss/amd64-fbsd32.c b/usr.bin/truss/amd64-fbsd32.c index dac6aa1..45da1cd 100644 --- a/usr.bin/truss/amd64-fbsd32.c +++ b/usr.bin/truss/amd64-fbsd32.c @@ -236,7 +236,8 @@ i386_syscall_entry(struct trussinfo *trussinfo, int nargs) { * parameter? */ - if (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit")) { + if (fsc.name != NULL && + (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { /* XXX * This could be done in a more general diff --git a/usr.bin/truss/i386-fbsd.c b/usr.bin/truss/i386-fbsd.c index dac6aa1..45da1cd 100644 --- a/usr.bin/truss/i386-fbsd.c +++ b/usr.bin/truss/i386-fbsd.c @@ -236,7 +236,8 @@ i386_syscall_entry(struct trussinfo *trussinfo, int nargs) { * parameter? */ - if (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit")) { + if (fsc.name != NULL && + (!strcmp(fsc.name, "execve") || !strcmp(fsc.name, "exit"))) { /* XXX * This could be done in a more general diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 42c2fa6..6bae74e 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -165,6 +165,8 @@ struct syscall * get_syscall(const char *name) { struct syscall *sc = syscalls; + if (name == NULL) + return (NULL); while (sc->name) { if (!strcmp(name, sc->name)) return sc; |