fix memory region validation in argptr()
This commit is contained in:
		
							parent
							
								
									0df5f11bae
								
							
						
					
					
						commit
						2a675089b1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -58,7 +58,7 @@ argptr(int n, char **pp, int size) | |||
| 
 | ||||
|   if(argint(n, &i) < 0) | ||||
|     return -1; | ||||
|   if((uint)i >= proc->sz || (uint)i+size > proc->sz) | ||||
|   if(size < 0 || (uint)i >= proc->sz || (uint)i+size > proc->sz) | ||||
|     return -1; | ||||
|   *pp = (char*)i; | ||||
|   return 0; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 MikeCAT
						MikeCAT