[augeas-devel] [PATCH 4/8] * src/pathx.c (parse_name): do not allow ')' in names

David Lutterkort lutter at redhat.com
Wed Feb 18 21:30:51 UTC 2009


Names can not contain ')', otherwise we will run beyond the end of
arguments in a function call like 'f(name)'
---
 src/pathx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/pathx.c b/src/pathx.c
index ef41a80..09374e1 100644
--- a/src/pathx.c
+++ b/src/pathx.c
@@ -917,6 +917,7 @@ static char *parse_name(struct state *state) {
     while (*state->pos != '\0' &&
            *state->pos != L_BRACK && *state->pos != SEP &&
            *state->pos != R_BRACK && *state->pos != '=' &&
+           *state->pos != ')' &&
            !isspace(*state->pos)) {
         if (*state->pos == '\\') {
             state->pos += 1;
-- 
1.6.0.6




More information about the augeas-devel mailing list