From: Alan T. DeKok Date: Tue, 3 Sep 2024 16:53:37 +0000 (-0400) Subject: move assertion to run-time error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04655951047af125885bf74b43e2a029f90efb03;p=thirdparty%2Ffreeradius-server.git move assertion to run-time error so that we don't crash when the admin mis-types something --- diff --git a/src/lib/server/tmpl_eval.c b/src/lib/server/tmpl_eval.c index b4ffe37cb1..dc5acbbdfb 100644 --- a/src/lib/server/tmpl_eval.c +++ b/src/lib/server/tmpl_eval.c @@ -1172,7 +1172,10 @@ int tmpl_eval_pair(TALLOC_CTX *ctx, fr_value_box_list_t *out, request_t *request break; default: - fr_assert(fr_type_is_leaf(vp->vp_type)); + if (!fr_type_is_leaf(vp->vp_type)) { + fr_strerror_const("Invalid data type for evaluation"); + goto fail; + } value = fr_value_box_alloc(ctx, vp->data.type, vp->da); if (!value) goto oom;