]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more assertions
authorAlan T. DeKok <aland@freeradius.org>
Wed, 4 Aug 2021 12:26:38 +0000 (08:26 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 4 Aug 2021 12:47:08 +0000 (08:47 -0400)
src/main/evaluate.c

index 363e3c4c502cce38a35fdc4278f0e063e793eb7f..ba214a26ffc9e8a53fc1cf4000be58ed527b5bc2 100644 (file)
@@ -173,6 +173,9 @@ static int cond_do_regex(REQUEST *request, fr_cond_t const *c,
        switch (map->rhs->type) {
        case TMPL_TYPE_REGEX_STRUCT: /* pre-compiled to a regex */
                preg = map->rhs->tmpl_preg;
+#ifdef HAVE_PCRE
+               rad_assert(preg->precompiled);
+#endif
                break;
 
        default:
@@ -187,6 +190,9 @@ static int cond_do_regex(REQUEST *request, fr_cond_t const *c,
                        return -1;
                }
                preg = rreg;
+#ifdef HAVE_PCRE
+               rad_assert(!preg->precompiled);
+#endif
                break;
        }