mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	pktgen: Remove VLA usage
In preparation to enabling -Wvla, remove VLA usage and replace it with a fixed-length array instead. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									ff3c1b1a81
								
							
						
					
					
						commit
						35951393bb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -907,7 +907,7 @@ static ssize_t pktgen_if_write(struct file *file,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (debug) {
 | 
						if (debug) {
 | 
				
			||||||
		size_t copy = min_t(size_t, count, 1023);
 | 
							size_t copy = min_t(size_t, count, 1023);
 | 
				
			||||||
		char tb[copy + 1];
 | 
							char tb[1024];
 | 
				
			||||||
		if (copy_from_user(tb, user_buffer, copy))
 | 
							if (copy_from_user(tb, user_buffer, copy))
 | 
				
			||||||
			return -EFAULT;
 | 
								return -EFAULT;
 | 
				
			||||||
		tb[copy] = 0;
 | 
							tb[copy] = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue