summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2015-05-24 17:38:02 +0000
committerdchagin <dchagin@FreeBSD.org>2015-05-24 17:38:02 +0000
commit92d496261e1d2fb58bce6b9ebc9086936c90e8aa (patch)
tree923303a13962f7963f7243cd38bef3d0e198cfdf /sys/i386/linux/linux_sysvec.c
parentdf01339e318f5ec0aab5a903310ae5fc3862f645 (diff)
downloadFreeBSD-src-92d496261e1d2fb58bce6b9ebc9086936c90e8aa.zip
FreeBSD-src-92d496261e1d2fb58bce6b9ebc9086936c90e8aa.tar.gz
Call nosys in case when the incorrect syscall number is specified.
Reported by: trinity
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index f27fad8..5ee9243 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -890,7 +890,8 @@ linux_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
sa->args[5] = frame->tf_ebp; /* Unconfirmed */
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;
OpenPOWER on IntegriCloud