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

This commit is contained in:
Alfred Perlstein 2004-08-08 23:29:36 +00:00
parent 4c814dfc27
commit d10f73b311
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133349
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;