]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
"no value for assignment" is possible
authorAlan T. DeKok <aland@freeradius.org>
Thu, 21 Jul 2022 00:00:27 +0000 (20:00 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 21 Jul 2022 00:00:27 +0000 (20:00 -0400)
and needs to be treated as a separate result.

src/lib/unlang/edit.c

index 75c362aa51029bdd08553beaf11928271f90d3d2..c8cdee73715f22f40173ed6087a6eb59b34728b2 100644 (file)
@@ -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.