From: Willy Tarreau Date: Tue, 26 Jan 2010 17:36:26 +0000 (+0100) Subject: [MINOR] config: off-by-one in "stick-table" after list of converters X-Git-Tag: v1.4-rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c5593169658d3642bcbc69d47d8aeb649d49d03;p=thirdparty%2Fhaproxy.git [MINOR] config: off-by-one in "stick-table" after list of converters --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 242ef82831..84b99fe26c 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2132,6 +2132,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) err_code |= ERR_ALERT | ERR_FATAL; goto out; } + myidx++; } else if (strcmp(args[myidx], "expire") == 0) { myidx++; @@ -2149,9 +2150,11 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) goto out; } curproxy->table.expire = val; + myidx++; } else if (strcmp(args[myidx], "nopurge") == 0) { curproxy->table.nopurge = 1; + myidx++; } else if (strcmp(args[myidx], "type") == 0) { myidx++; @@ -2161,8 +2164,14 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) err_code |= ERR_ALERT | ERR_FATAL; goto out; } + /* myidx already points to next arg */ + } + else { + Alert("parsing [%s:%d] : stick-table: unknown argument '%s'.\n", + file, linenum, args[myidx]); + err_code |= ERR_ALERT | ERR_FATAL; + goto out; } - myidx++; } if (!curproxy->table.size) {