exec() only accepts MAXARG arguments
The terminating NULL string is already included (see sys_exec()).
This commit is contained in:
		
							parent
							
								
									9195142959
								
							
						
					
					
						commit
						19ff379661
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -14,7 +14,7 @@ exec(char *path, char **argv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  char *s, *last;
 | 
					  char *s, *last;
 | 
				
			||||||
  int i, off;
 | 
					  int i, off;
 | 
				
			||||||
  uint64 argc, sz = 0, sp, ustack[MAXARG+1], stackbase;
 | 
					  uint64 argc, sz = 0, sp, ustack[MAXARG], stackbase;
 | 
				
			||||||
  struct elfhdr elf;
 | 
					  struct elfhdr elf;
 | 
				
			||||||
  struct inode *ip;
 | 
					  struct inode *ip;
 | 
				
			||||||
  struct proghdr ph;
 | 
					  struct proghdr ph;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue