]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use strdup instead of bstrdup_buffer. Fixes #3528
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Jul 2020 13:26:13 +0000 (09:26 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Jul 2020 13:26:13 +0000 (09:26 -0400)
as the second function expects the string to be talloc'd,
and it isn't.

src/lib/unlang/xlat_eval.c

index d84f9ee9e4c71ad20afbb9b6ee033b7083392073..72a9424179b82b5eedfe50775359c7af662752d0 100644 (file)
@@ -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;
        }