From: Christopher Faulet Date: Thu, 30 Apr 2020 07:57:40 +0000 (+0200) Subject: BUG/MINOR: sample: Set the correct type when a binary is converted to a string X-Git-Tag: v2.1.5~27 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=5268c1ae82c8e95b83345991bc1fb76082fae69e;p=haproxy-2.1.git BUG/MINOR: sample: Set the correct type when a binary is converted to a string A binary sample data can be converted, implicitly or not, to a string by cutting the buffer on the first null byte. I guess this patch should be backported to all stable versions. (cherry picked from commit 472ad51edeb4bb5ea601d7e296b5d0a0cd1a140a) Signed-off-by: Christopher Faulet --- diff --git a/src/sample.c b/src/sample.c index 7362a2d..6cda2e1 100644 --- a/src/sample.c +++ b/src/sample.c @@ -621,6 +621,7 @@ static int c_bin2str(struct sample *smp) break; } } + smp->data.type = SMP_T_STR; return 1; }