From: Alan T. DeKok Date: Thu, 21 Jul 2022 00:00:27 +0000 (-0400) Subject: "no value for assignment" is possible X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=712428ea6b47923ffdf7004d119f9db621f63a60;p=thirdparty%2Ffreeradius-server.git "no value for assignment" is possible and needs to be treated as a separate result. --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 75c362aa510..c8cdee73715 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -129,6 +129,11 @@ static int templatize_rhs(TALLOC_CTX *ctx, edit_result_t *out, fr_pair_t const * fr_type_t cast_type = FR_TYPE_STRING; fr_value_box_t *box = fr_dlist_head(&out->result); + if (!box) { + RPEDEBUG("No value found for assignment"); + return -1; + } + /* * There's only one box, and it's the correct type. Just * return that. This is the fast path.