From 7822c1d410a1c6e98f8367de7593ca6e52df1f37 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 19 Dec 1998 08:08:43 +0000 Subject: [PATCH] ChangeLog, subst.c: subst.c (get_subst_symbol): Add [0-9] to the list of valid characters for a substitution symbol. --- util/ChangeLog | 5 +++++ util/subst.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/util/ChangeLog b/util/ChangeLog index 05fb783..e1acb9c 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +1998-12-15 Theodore Ts'o + + * subst.c (get_subst_symbol): Add [0-9] to the list of valid + characters for a substitution symbol. + 1998-08-01 Theodore Ts'o * subst.c: Add the ability to substitute apparent shell/make diff --git a/util/subst.c b/util/subst.c index 9b9b176..f1f7a6e 100644 --- a/util/subst.c +++ b/util/subst.c @@ -86,12 +86,13 @@ static char *get_subst_symbol(const char *begin, int len, char prefix) start[len] = 0; /* - * The substitution variable must all be in the of [A-Za-z_]. + * The substitution variable must all be in the of [0-9A-Za-z_]. * If it isn't, this must be an invalid symbol name. */ for (cp = start; *cp; cp++) { if (!(*cp >= 'a' && *cp <= 'z') && !(*cp >= 'A' && *cp <= 'Z') && + !(*cp >= '0' && *cp <= '9') && !(*cp == '_')) return NULL; } -- 1.8.3.1