26 Jun
2020
26 Jun
'20
7:44 a.m.
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 bug was introduced by version 2.0.4, commit 4c553c5a5b40 ("Filter refactoring: dropped the recursion from the interpreter", 2018-12-27). --- filter/data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/filter/data.c b/filter/data.c index 402202554c2f..9547a4c84833 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]))) -- 2.27.0