]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't leave shallow references to an sbuff
authorAlan T. DeKok <aland@freeradius.org>
Wed, 6 Jul 2022 18:07:09 +0000 (14:07 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 6 Jul 2022 18:07:09 +0000 (14:07 -0400)
src/lib/unlang/xlat_builtin.c

index 927bd3c90a55f839af42399d496639efd26a01d8..45efd54a276acd41f158ca477eda20312fb4e69a 100644 (file)
@@ -2109,7 +2109,7 @@ static xlat_action_t xlat_func_cast(TALLOC_CTX *ctx, fr_dcursor_t *out,
                        return XLAT_ACTION_FAIL;
                }
 
-               fr_value_box_bstrndup_shallow(dst, NULL, fr_sbuff_start(agg), fr_sbuff_used(agg), false);
+               fr_value_box_bstrndup(dst, dst, NULL, fr_sbuff_start(agg), fr_sbuff_used(agg), false);
                fr_dcursor_append(out, dst);
 
                return XLAT_ACTION_DONE;