Skip to content

Commit 0864cdd

Browse files
committed
strings may have embedded NULs
1 parent d82d019 commit 0864cdd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/unlang/xlat_tokenize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static CC_HINT(nonnull(1,2,4)) ssize_t xlat_tokenize_input(xlat_exp_head_t *head
799799
if (slen > 0) {
800800
do_value_box:
801801
xlat_exp_set_name_shallow(node, str);
802-
fr_value_box_strdup(node, &node->data, NULL, str, false);
802+
fr_value_box_bstrndup(node, &node->data, NULL, str, talloc_array_length(str) - 1, false);
803803
fr_value_box_mark_safe_for(&node->data, t_rules->literals_safe_for);
804804
node->flags.constant = true;
805805
fr_assert(node->flags.pure);

0 commit comments

Comments
 (0)