From: Alan T. DeKok Date: Tue, 21 Jul 2020 13:26:13 +0000 (-0400) Subject: use strdup instead of bstrdup_buffer. Fixes #3528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4ce0af152fbf05693dfb968c9c4ecece5bd66c5;p=thirdparty%2Ffreeradius-server.git use strdup instead of bstrdup_buffer. Fixes #3528 as the second function expects the string to be talloc'd, and it isn't. --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index d84f9ee9e4c..72a9424179b 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -460,7 +460,7 @@ static xlat_action_t xlat_eval_pair_virtual(TALLOC_CTX *ctx, fr_cursor_t *out, R if (!request->component) return XLAT_ACTION_DONE; MEM(value = fr_value_box_alloc_null(ctx)); - if (fr_value_box_bstrdup_buffer(ctx, value, tmpl_da(vpt), request->component, false) < 0) goto error; + if (fr_value_box_strdup(ctx, value, tmpl_da(vpt), request->component, false) < 0) goto error; goto done; }