From 4571cd3cc6150ad61e136bf28de8f47e8fca8459 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Tue, 4 Jun 2013 09:26:26 -0400 Subject: [PATCH] A better fix for checking single-character expansions --- src/main/xlat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/xlat.c b/src/main/xlat.c index f91f213bf1e6..c153694e3a23 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -1010,7 +1010,9 @@ static ssize_t xlat_tokenize_literal(TALLOC_CTX *ctx, char *fmt, xlat_exp_t **he char *c = p; while (c) { - if (!c[1] || !strchr("%dlmtDGHISTY{", c[1])) { + if (c[1] == '{') break; /* this will be checked later */ + + if (!c[1] || !strchr("%dlmtDGHISTY", c[1])) { talloc_free(node); *error = "Invalid variable expansion"; c++;