mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pod: avoid child size check
This will give us 0 children later and is not a problem for this function.
This commit is contained in:
		
							parent
							
								
									847982eb0e
								
							
						
					
					
						commit
						2c11f65701
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		| 
						 | 
					@ -327,8 +327,6 @@ SPA_API_POD_BODY int spa_pod_body_get_choice(const struct spa_pod *pod, const vo
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
	choice->pod = *pod;
 | 
						choice->pod = *pod;
 | 
				
			||||||
	memcpy(&choice->body, body, sizeof(struct spa_pod_choice_body));
 | 
						memcpy(&choice->body, body, sizeof(struct spa_pod_choice_body));
 | 
				
			||||||
	if (choice->pod.size - sizeof(struct spa_pod_choice_body) < choice->body.child.size)
 | 
					 | 
				
			||||||
		return -EINVAL;
 | 
					 | 
				
			||||||
	*choice_body = SPA_PTROFF(body, sizeof(struct spa_pod_choice_body), void);
 | 
						*choice_body = SPA_PTROFF(body, sizeof(struct spa_pod_choice_body), void);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue