BUG/MINOR: cli: Fix a crash when sending a command with too many arguments

This bug was introduced in 48bcfdab2 ("MEDIUM: dumpstat: make the CLI
parser understand the backslash as an escape char").

This should be backported to 1.8.

Signed-off-by: Aurlien Nephtali <aurelien.nephtali@corp.ovh.com>
This commit is contained in:
Aurlien Nephtali 2018-03-16 10:11:06 +01:00 committed by Willy Tarreau
parent 6e8a41d8fc
commit 6a61e968ac

View File

@ -416,7 +416,7 @@ static int cli_parse_request(struct appctx *appctx, char *line)
/* unescape '\' */
arg = 0;
while (*args[arg] != '\0') {
while (arg <= MAX_STATS_ARGS && *args[arg] != '\0') {
j = 0;
for (i=0; args[arg][i] != '\0'; i++) {
if (args[arg][i] == '\\') {