Remove bogus checks against NCARGS.
NCARGS isn't a limit on the number of arguments to pass to a function, but the number of bytes that can be consumed by arguments to exec. As such, it is not suitable for a limit on the count of arguments passed to makecontext(). Sponsored by: DARPA / AFRL
This commit is contained in:
parent
7193311b15
commit
80996ef878
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328631
@ -85,7 +85,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
|
||||
ucp->uc_mcontext.mc_len = 0;
|
||||
}
|
||||
/* XXX - Do we want to sanity check argc? */
|
||||
else if ((argc < 0) || (argc > NCARGS)) {
|
||||
else if (argc < 0) {
|
||||
ucp->uc_mcontext.mc_len = 0;
|
||||
}
|
||||
/* Make sure the context is valid. */
|
||||
|
@ -66,7 +66,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
|
||||
int i, regargs, stackargs;
|
||||
|
||||
/* Sanity checks */
|
||||
if ((ucp == NULL) || (argc < 0) || (argc > NCARGS)
|
||||
if ((ucp == NULL) || (argc < 0)
|
||||
|| (ucp->uc_stack.ss_sp == NULL)
|
||||
|| (ucp->uc_stack.ss_size < MINSIGSTKSZ)) {
|
||||
/* invalidate context */
|
||||
|
@ -66,7 +66,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...)
|
||||
int i, regargs, stackargs;
|
||||
|
||||
/* Sanity checks */
|
||||
if ((ucp == NULL) || (argc < 0) || (argc > NCARGS)
|
||||
if ((ucp == NULL) || (argc < 0)
|
||||
|| (ucp->uc_stack.ss_sp == NULL)
|
||||
|| (ucp->uc_stack.ss_size < MINSIGSTKSZ)) {
|
||||
/* invalidate context */
|
||||
|
Loading…
Reference in New Issue
Block a user