Merge r289055 to amd64/linux32:
linux: fix handling of out-of-bounds syscall attempts Due to an off by one the code would read an entry past the table, as opposed to the last entry which contains the nosys handler.
This commit is contained in:
parent
d9a4f21fa7
commit
5047105b71
@ -741,7 +741,7 @@ linux32_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
|
||||
|
||||
if (sa->code >= p->p_sysent->sv_size)
|
||||
/* nosys */
|
||||
sa->callp = &p->p_sysent->sv_table[LINUX_SYS_MAXSYSCALL];
|
||||
sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1];
|
||||
else
|
||||
sa->callp = &p->p_sysent->sv_table[sa->code];
|
||||
sa->narg = sa->callp->sy_narg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user