mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	avb: validate random data for xsubi
This commit is contained in:
		
							parent
							
								
									f2e1827e18
								
							
						
					
					
						commit
						a969feb3c0
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -421,7 +421,10 @@ struct avb_maap *avb_maap_register(struct server *server)
 | 
			
		|||
	maap->server = server;
 | 
			
		||||
	pw_log_info("0x%"PRIx64" %d", server->entity_id, server->ifindex);
 | 
			
		||||
 | 
			
		||||
	pw_getrandom(maap->xsubi, sizeof(maap->xsubi), 0);
 | 
			
		||||
	if (pw_getrandom(maap->xsubi, sizeof(maap->xsubi), 0) != sizeof(maap->xsubi)) {
 | 
			
		||||
		res = -errno;
 | 
			
		||||
		goto error;
 | 
			
		||||
	}
 | 
			
		||||
	load_state(maap);
 | 
			
		||||
 | 
			
		||||
	maap->source = pw_loop_add_io(server->impl->loop, fd, SPA_IO_IN, true, on_socket_data, maap);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue