diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1999-03-24 02:43:05 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1999-03-24 02:43:05 +0000 |
| commit | 5fe5a4dd73c51768c4521f60735f0619ae7730aa (patch) | |
| tree | 86f6f9421f4a86afcae08595b4d8f627b4a410fb /lib/libc/gen/exec.c | |
| parent | 1ea272a6323d45ab5a593f174d6030a87f8934ac (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/exec.c')
| -rw-r--r-- | lib/libc/gen/exec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 467be8154790..b3dd5f3e27da 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: exec.c,v 1.10 1998/10/15 17:14:15 des Exp $"; + "$Id: exec.c,v 1.11 1999/03/23 16:40:34 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -268,7 +268,7 @@ retry: (void)execve(bp, argv, environ); case ENOEXEC: for (cnt = 0; argv[cnt]; ++cnt) ; - memp = alloca((cnt + 3) * sizeof(char *)); + memp = alloca((cnt + 2) * sizeof(char *)); if (memp == NULL) { /* errno = ENOMEM; XXX override ENOEXEC? */ goto done; @@ -276,7 +276,6 @@ retry: (void)execve(bp, argv, environ); memp[0] = "sh"; memp[1] = bp; bcopy(argv + 1, memp + 2, cnt * sizeof(char *)); - memp[cnt + 2] = NULL; (void)execve(_PATH_BSHELL, memp, environ); goto done; case ENOMEM: |
