]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mworker/cli: check ci_insert() return value in pcli_parse_request()
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 4 May 2026 17:00:27 +0000 (19:00 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 4 May 2026 17:03:48 +0000 (19:03 +0200)
commit166dfcbbeed348bbdb4798818e24bc99239a2aaf
tree64556faecc4312c6a3893517c818222ebee42611
parent946921c199802b673acfe5fdeac19854c85e5c0f
BUG/MINOR: mworker/cli: check ci_insert() return value in pcli_parse_request()

All ci_insert() calls in pcli_parse_request() were ignoring the return
value, silently miscounting the bytes to forward if an insertion failed.

Add a check on each call and return -1 on failure. In practice this has
no impact: the channel receive machinery enforces a maxrewrite reserve,
so there is always sufficient room in the buffer for these small
prefixes by the time pcli_parse_request() is called.

Must be backported in every maintained versions, the list of available
commands might change.
src/cli.c