From: Alan T. DeKok Date: Fri, 10 Dec 2021 23:54:26 +0000 (-0500) Subject: compile regex string, not xlat input X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4dc4730e2e0d9dea876d91ca27cf7c816e6144d;p=thirdparty%2Ffreeradius-server.git compile regex string, not xlat input there's no tests for this functionality, and looks like it probably never worked right in v4. It should probably just be removed --- diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index 19f88aba99..7691bae431 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -1392,7 +1392,7 @@ int fr_pair_cmp(fr_pair_t const *a, fr_pair_t const *b) if (!fr_cond_assert(a->vp_type == FR_TYPE_STRING)) return -1; - slen = regex_compile(NULL, &preg, a->xlat, talloc_array_length(a->xlat) - 1, + slen = regex_compile(NULL, &preg, a->vp_strvalue, talloc_array_length(a->vp_strvalue) - 1, NULL, false, true); if (slen <= 0) { fr_strerror_printf_push("Error at offset %zu compiling regex for %s", -slen,