don't seg if the syscall is invalid for i386fbsd.

This commit is contained in:
alfred 2004-08-08 23:29:36 +00:00
parent 9c026741d8
commit 46edc34b3d
3 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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;