From: Kazuki Yamaguchi Date: Sun, 28 Jun 2020 13:33:26 +0000 (+0200) Subject: Filter: Fix comparison of BGP path mask X-Git-Tag: v2.0.8~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ef0a966392672d04a567c25758462fe3bbb0fb4;p=thirdparty%2Fbird.git 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. --- diff --git a/filter/data.c b/filter/data.c index 402202554..9547a4c84 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; ilen; i++) if (!pmi_same(&(m1->item[i]), &(m2->item[i])))