]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cli: Properly parse empty lines and avoid crashed
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Jun 2025 08:41:46 +0000 (10:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Jun 2025 08:46:13 +0000 (10:46 +0200)
commitf5d41803d3b432a042a61e93741e278cfea7c208
treeff806baafcb313754e9c7debb5de08f484a165c5
parent16eb0fab319dae5cfde1b69de8927c757e1dba78
BUG/MEDIUM: cli: Properly parse empty lines and avoid crashed

Empty lines was not properly parsed and could lead to crashes because the
last argument was parsed outside of the cmdline buffer. Indeed, the last
argument is parsed to look for an eventual payload pattern. It is started
one character after the newline at the end of the command line. But it is
only valid for an non-empty command line.

So, now, this case is properly detected when we leave if an empty line is
detected.

This patch must be backported to 3.2.
src/cli.c