From 472ad51edeb4bb5ea601d7e296b5d0a0cd1a140a Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 30 Apr 2020 09:57:40 +0200 Subject: [PATCH] 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. --- src/sample.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sample.c b/src/sample.c index 8bdbbe458..b9fe37f7f 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; }