diff --git a/src/http_conv.c b/src/http_conv.c index 5449f7adc..ed276b2e8 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -273,6 +273,9 @@ static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void smp->flags &= ~SMP_F_CONST; } + if (smp->data.u.str.size <= smp->data.u.str.data) + return 0; + /* Add final \0 required by url_decode(), and convert the input string. */ smp->data.u.str.area[smp->data.u.str.data] = '\0';