diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2020-06-28 15:33:26 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2020-06-28 15:33:26 +0200 |
commit | 4ef0a966392672d04a567c25758462fe3bbb0fb4 (patch) | |
tree | 97b2b60261be5af0ca3a025b739edd6cdb1e7805 /filter | |
parent | 82937b465b3a50bdcb00eff0b7aa6acb3fc21772 (diff) |
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.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/data.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/filter/data.c b/filter/data.c index 40220255..9547a4c8 100644 --- a/filter/data.c +++ b/filter/data.c @@ -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]))) |