]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
expanding the expression may fail
authorAlan T. DeKok <aland@freeradius.org>
Tue, 31 Jan 2023 15:29:37 +0000 (10:29 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 1 Feb 2023 01:05:37 +0000 (20:05 -0500)
src/lib/unlang/edit.c

index e41e70b578a211398ddf18518e6a1cb82dec18d6..faf1aacd2258d5f0e6c4bfb707e77275534c8ec3 100644 (file)
@@ -593,6 +593,13 @@ static int apply_edits_to_leaf(request_t *request, unlang_frame_state_edit_t *st
                 *      LHS, and then discover that we need to delete it.
                 */
                fr_strerror_clear();
+
+               /*
+                *      Something went wrong creating the value, it's a failure.  Note that we fail _all_
+                *      subsequent assignments, too.
+                */
+               if (fr_type_is_null(box->type)) goto fail;
+
                vp = tmpl_dcursor_build_init(&err, state, &lhs_cc, &lhs_cursor, request, current->lhs.vpt, edit_list_pair_build, current);
                tmpl_dcursor_clear(&lhs_cc);
                if (!vp) {