]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
compile regex string, not xlat input
authorAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 23:54:26 +0000 (18:54 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 10 Dec 2021 23:54:26 +0000 (18:54 -0500)
there's no tests for this functionality, and looks like it
probably never worked right in v4.  It should probably just be
removed

src/lib/util/pair.c

index 19f88aba993928988aee4fabcbb118f79ca825bc..7691bae43193c9508d867b5911ad5ab2eff1ba53 100644 (file)
@@ -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,