aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2005-06-24 17:41:28 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2005-06-24 17:41:28 +0000
commitde1c01ad370948cab879d4adcdcac33e39ef4ecf (patch)
tree59b772f10a234fb0e5721fb72fe72c64f067a2d3
parent21ce09ca810e841eb46e940f4d3a9629cf0a45b6 (diff)
Notes
-rw-r--r--sys/amd64/linux32/linux32_machdep.c3
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c
index fa15b2402a513..7f738bb5b2b81 100644
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -113,7 +113,8 @@ linux_exec_copyin_args(struct image_args *args, char *fname,
* Allocate temporary demand zeroed space for argument and
* environment strings
*/
- args->buf = (char *) kmem_alloc_wait(exec_map, PATH_MAX + ARG_MAX);
+ args->buf = (char *) kmem_alloc_wait(exec_map,
+ PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
if (args->buf == NULL)
return (ENOMEM);
args->begin_argv = args->buf;
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index ae61fbd90439b..940da4eec4658 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -237,7 +237,8 @@ freebsd32_exec_copyin_args(struct image_args *args, char *fname,
* Allocate temporary demand zeroed space for argument and
* environment strings
*/
- args->buf = (char *) kmem_alloc_wait(exec_map, PATH_MAX + ARG_MAX);
+ args->buf = (char *) kmem_alloc_wait(exec_map,
+ PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
if (args->buf == NULL)
return (ENOMEM);
args->begin_argv = args->buf;