From ebb801d7c814b4ffddca119bd176696054dbb513 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 8 Apr 2026 10:28:25 +0200 Subject: [PATCH] BUG/MEDIUM: cli: Properly handle too big payload on a command line When command line is parsed, when the payload was too big the error was not properly handled. Instead of leaving the parsing function to print the error, we looped infinitly trying to parse remaining data. When the command line is too big, we must exit the parsing function in CLI_ST_PRINT_ERR state. Instead of exiting the function, we only left the while loop, setting this way the cli applet in CLI_ST_PROMPT state. This patch must be backported as far as 3.2. --- src/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli.c b/src/cli.c index 8191eb09b..e37276a1c 100644 --- a/src/cli.c +++ b/src/cli.c @@ -994,6 +994,7 @@ int cli_parse_cmdline(struct appctx *appctx) cli_err(appctx, "The command line is too big for the buffer size. Please change tune.bufsize in the configuration to use a bigger command.\n"); applet_set_error(appctx); b_reset(&appctx->inbuf); + goto end; } break; }