Skip to content

Commit

Permalink
A better fix for checking single-character expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jun 4, 2013
1 parent 1ea7374 commit 4571cd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/xlat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 4571cd3

Please sign in to comment.