From 4e88ea446cbc773e8f8633a6fc7bda2c155ed20a Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 7 May 2001 18:29:33 +0000 Subject: 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 so that there is not a fixed 127 byte buffer. Too easy to overflow... -Erik --- libc/unistd/execl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/unistd/execl.c') diff --git a/libc/unistd/execl.c b/libc/unistd/execl.c index a05867ef8..9d49d5abd 100644 --- a/libc/unistd/execl.c +++ b/libc/unistd/execl.c @@ -26,7 +26,7 @@ int execl(__const char *path, __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; -- cgit v1.2.3