]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: init: report invalid characters in debug description strings
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Apr 2025 17:00:01 +0000 (19:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Apr 2025 17:02:13 +0000 (19:02 +0200)
commita8148c313a787b4df9b8ba379eaba2f417d9cf1e
treeb7f0679d29d5cdb7a0470e184bfe3680d6439168
parent9efc60c8872a44e3d456c9912b117c895b4a5b21
DEBUG: init: report invalid characters in debug description strings

It's easy to leave some trailing \n or even other characters that can
mangle the debug output. Let's verify at boot time that the debug sections
are clean by checking for chars 0x20 to 0x7e inclusive. This is very simple
to do and it managed to find another one in a multi-line message:

  [WARNING]  (23696) : Invalid character 0x0a at position 96 in description string at src/cli.c:2516 _send_status()

This way new offending code will be spotted before being committed.
src/debug.c