From: Arran Cudbard-Bell Date: Fri, 29 Oct 2021 03:56:16 +0000 (-0400) Subject: Fix another overflow X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d50f42f186f3093e0d9e6f32a502bd40b5bf2754;p=thirdparty%2Ffreeradius-server.git Fix another overflow --- diff --git a/src/lib/util/table.c b/src/lib/util/table.c index 3b25cba85c7..ba32bad614b 100644 --- a/src/lib/util/table.c +++ b/src/lib/util/table.c @@ -406,7 +406,7 @@ static void const *table_ordered_value_by_longest_prefix(size_t *match_len, offset = TABLE_IDX(table, i, element_size); - for (j = 0; (j < (size_t)name_len) && (name[j] == (ELEM_STR(offset))[j]); j++); + for (j = 0; (j < (size_t)name_len) && (j < ELEM_LEN(offset)) && (name[j] == (ELEM_STR(offset))[j]); j++); /* * If we didn't get to the end of the