exec() only accepts MAXARG arguments

The terminating NULL string is already included (see sys_exec()).
This commit is contained in:
l0stman 2020-11-10 07:48:02 +03:00 committed by Frans Kaashoek
parent 9195142959
commit 19ff379661

View file

@ -14,7 +14,7 @@ exec(char *path, char **argv)
{
char *s, *last;
int i, off;
uint64 argc, sz = 0, sp, ustack[MAXARG+1], stackbase;
uint64 argc, sz = 0, sp, ustack[MAXARG], stackbase;
struct elfhdr elf;
struct inode *ip;
struct proghdr ph;