mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
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:
parent
6e8a41d8fc
commit
6a61e968ac
@ -416,7 +416,7 @@ static int cli_parse_request(struct appctx *appctx, char *line)
|
|||||||
|
|
||||||
/* unescape '\' */
|
/* unescape '\' */
|
||||||
arg = 0;
|
arg = 0;
|
||||||
while (*args[arg] != '\0') {
|
while (arg <= MAX_STATS_ARGS && *args[arg] != '\0') {
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i=0; args[arg][i] != '\0'; i++) {
|
for (i=0; args[arg][i] != '\0'; i++) {
|
||||||
if (args[arg][i] == '\\') {
|
if (args[arg][i] == '\\') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user