From: Alan T. DeKok Date: Fri, 16 Sep 2022 00:56:30 +0000 (-0400) Subject: assert that there's always a format for the node X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2057ac39a9ebdccd3d7f0cf8e4b0081d6fc198d5;p=thirdparty%2Ffreeradius-server.git assert that there's always a format for the node --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 22e658ffd74..6a94ee0f0af 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -81,12 +81,15 @@ static char *xlat_fmt_aprint(TALLOC_CTX *ctx, xlat_exp_t const *node) switch (node->type) { case XLAT_BOX: case XLAT_GROUP: + fr_assert(node->fmt != NULL); return talloc_asprintf(ctx, "%s", node->fmt); case XLAT_ONE_LETTER: + fr_assert(node->fmt != NULL); return talloc_asprintf(ctx, "%%%s", node->fmt); case XLAT_TMPL: + fr_assert(node->fmt != NULL); return talloc_asprintf(ctx, "%%{%s}", node->fmt); case XLAT_VIRTUAL: