]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
make xlat_tokenize_literal() respect inlen
authorAlan T. DeKok <aland@freeradius.org>
Sat, 21 Mar 2020 15:21:36 +0000 (11:21 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 21 Mar 2020 15:21:36 +0000 (11:21 -0400)
src/lib/server/xlat_tokenize.c

index e8f4e9076a2b641f57db2a8d575ba86803772e53..2f7e474cd13e462bebd93cc677aaeb6686691514 100644 (file)
@@ -574,7 +574,7 @@ static ssize_t xlat_tokenize_literal(TALLOC_CTX *ctx, xlat_exp_t **head, char co
        XLAT_DEBUG("LITERAL <-- %s", in);
 
        node = talloc_zero(ctx, xlat_exp_t);
-       node->fmt = start = talloc_typed_strdup(node, in);
+       node->fmt = start = talloc_bstrndup(node, in, inlen);
        node->len = 0;
        node->type = XLAT_LITERAL;