From 11802b7ce7a1f43dd0526024c4b82b5a8cbaf851 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 26 May 2026 08:24:04 +0200 Subject: [PATCH] BUG/MINOR: sample: request an extra output byte for the url_dec converter A dynamic chunk size is now being allocated for output since commit dfc4085413 ("MEDIUM: sample: Get chunks with a size dependent on input data when necessary"). However this one missed the need for the trailing zero when specifying the size, let's add it. No backport is needed, this is only in 3.4. --- src/http_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_conv.c b/src/http_conv.c index a46432dc0..c0a2f9536 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -263,7 +263,7 @@ static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void * before decoding. */ if (smp->flags & SMP_F_CONST || smp->data.u.str.size <= smp->data.u.str.data) { - struct buffer *str = get_trash_chunk_sz(smp->data.u.str.data); + struct buffer *str = get_trash_chunk_sz(smp->data.u.str.data + 1); if (!str) return 0;