From: Alan T. DeKok Date: Tue, 31 Jan 2023 15:29:37 +0000 (-0500) Subject: expanding the expression may fail X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb1e0d7387bea9dd3d61a49b7e3e351a98c63e7e;p=thirdparty%2Ffreeradius-server.git expanding the expression may fail --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index e41e70b578a..faf1aacd225 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -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) {