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.2-dev7~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=472ad51edeb4bb5ea601d7e296b5d0a0cd1a140a;p=thirdparty%2Fhaproxy.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. --- diff --git a/src/sample.c b/src/sample.c index 8bdbbe458d..b9fe37f7f0 100644 --- a/src/sample.c +++ b/src/sample.c @@ -623,6 +623,7 @@ static int c_bin2str(struct sample *smp) break; } } + smp->data.type = SMP_T_STR; return 1; }