mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Add FreeBSD variant of the ioctl request check.
This commit is contained in:
		
							parent
							
								
									65aea7c05a
								
							
						
					
					
						commit
						35c9de34e8
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -1741,7 +1741,11 @@ static int v4l2_ioctl(int fd, unsigned long int request, void *arg)
 | 
				
			||||||
	if ((file = find_file(fd)) == NULL)
 | 
						if ((file = find_file(fd)) == NULL)
 | 
				
			||||||
		return globals.old_fops.ioctl(fd, request, arg);
 | 
							return globals.old_fops.ioctl(fd, request, arg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __FreeBSD__
 | 
				
			||||||
 | 
						if (arg == NULL && (request & IOC_DIRMASK != IOC_VOID)) {
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
	if (arg == NULL && (_IOC_DIR(request) & (_IOC_WRITE | _IOC_READ))) {
 | 
						if (arg == NULL && (_IOC_DIR(request) & (_IOC_WRITE | _IOC_READ))) {
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		res = -EFAULT;
 | 
							res = -EFAULT;
 | 
				
			||||||
		goto done;
 | 
							goto done;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue