0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 16:48:43 +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:
Kazuki Yamaguchi 2020-06-28 15:33:26 +02:00 committed by Ondrej Zajicek (work)
parent 82937b465b
commit 4ef0a96639

View File

@ -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])))