summaryrefslogtreecommitdiff
path: root/libc/unistd/execlp.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-07 18:29:33 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-07 18:29:33 +0000
commit4e88ea446cbc773e8f8633a6fc7bda2c155ed20a (patch)
tree8bad46b02870c53bc4ed16a654a5d3497a27f9ce /libc/unistd/execlp.c
parente2058fa00790c7e731e08e2a273350bf784c559e (diff)
Change FILENAME_MAX to be only 255. Max filename on ext2 is 255,
so there is no reason to allocate 4k. Change working of execvep.c per patch from Matthias Kilian <kili@outback.escape.de> so that there is not a fixed 127 byte buffer. Too easy to overflow... -Erik
Diffstat (limited to 'libc/unistd/execlp.c')
-rw-r--r--libc/unistd/execlp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/unistd/execlp.c b/libc/unistd/execlp.c
index fef10d376..1e2f6558d 100644
--- a/libc/unistd/execlp.c
+++ b/libc/unistd/execlp.c
@@ -28,7 +28,7 @@ int execlp(__const char *file, __const char *arg, ...)
if (i <= 16)
argv = shortargv;
else {
- argv = (const char **) malloc(sizeof(char *) * i);
+ argv = (const char **) alloca(sizeof(char *) * i);
}
argv[0] = arg;