BUG/MINOR: httpclient/cli: display junk characters in vsn
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 16 Feb 2022 10:37:02 +0000 (11:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Feb 2022 13:41:04 +0000 (14:41 +0100)
commit6a23b1249e372d79f7d967f6533ddd31268fe1b6
treeba71864d12c1fc7a6ed4e82cd8eabe8490bcad5c
parent85dba93a0450d33329e242104afef8b3121bcb5c
BUG/MINOR: httpclient/cli: display junk characters in vsn

ist are not ended by '\0', leading to junk characters being displayed
when using %s for printing the HTTP start line.

Fix the issue by replacing %s by %.*s + istlen.

Must be backported in 2.5.

(cherry picked from commit de6ecc3aceaf93612eb37ff5a913fcd8e741ea67)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/http_client.c