mirror of
				https://gitlab.labs.nic.cz/labs/bird.git
				synced 2024-05-11 16:54:54 +00:00 
			
		
		
		
	Filter: Fix comparison of BGP path mask
Add a missing return statement. Path masks with the same length were all considered the same. Comparing two with different length would cause out-of-bounds memory access.
This commit is contained in:
		
				
					committed by
					
						
						Ondrej Zajicek (work)
					
				
			
			
				
	
			
			
			
						parent
						
							82937b465b
						
					
				
				
					commit
					4ef0a96639
				
			@@ -230,6 +230,7 @@ static int
 | 
			
		||||
pm_same(const struct f_path_mask *m1, const struct f_path_mask *m2)
 | 
			
		||||
{
 | 
			
		||||
  if (m1->len != m2->len)
 | 
			
		||||
    return 0;
 | 
			
		||||
 | 
			
		||||
  for (uint i=0; i<m1->len; i++)
 | 
			
		||||
    if (!pmi_same(&(m1->item[i]), &(m2->item[i])))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user