aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux32_sysvec.c
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2015-05-24 17:38:02 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2015-05-24 17:38:02 +0000
commitfcdffc03f80577070fad20ff11fa3c9c5c09328e (patch)
tree923303a13962f7963f7243cd38bef3d0e198cfdf /sys/amd64/linux32/linux32_sysvec.c
parent8d939ad4056cfd996a9d3d5dfeeb5565047d2fec (diff)
downloadsrc-fcdffc03f80577070fad20ff11fa3c9c5c09328e.tar.gz
src-fcdffc03f80577070fad20ff11fa3c9c5c09328e.zip
Call nosys in case when the incorrect syscall number is specified.
Reported by: trinity
Notes
Notes: svn path=/head/; revision=283467
Diffstat (limited to 'sys/amd64/linux32/linux32_sysvec.c')
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index bf570c73ced3..508fd2850706 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -764,7 +764,8 @@ linux32_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
sa->code = frame->tf_rax;
if (sa->code >= p->p_sysent->sv_size)
- sa->callp = &p->p_sysent->sv_table[0];
+ /* nosys */
+ sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL];
else
sa->callp = &p->p_sysent->sv_table[sa->code];
sa->narg = sa->callp->sy_narg;