BUG/MEDIUM: http_fetch: Make sure name is initialized before http_find_header.

Before calling http_find_header, make sure name is initialized properly, or
its value would be random.
This commit is contained in:
Olivier Houchard 2018-11-21 13:49:48 +01:00 committed by Christopher Faulet
parent 220567ec34
commit e2c78cd3e8

View File

@ -1165,6 +1165,9 @@ static int smp_fetch_fhdr_cnt(const struct arg *args, struct sample *smp, const
if (args && args->type == ARGT_STR) {
name.ptr = args->data.str.area;
name.len = args->data.str.data;
} else {
name.ptr = NULL;
name.len = 0;
}
ctx.blk = NULL;
@ -1390,6 +1393,9 @@ static int smp_fetch_hdr_cnt(const struct arg *args, struct sample *smp, const c
if (args && args->type == ARGT_STR) {
name.ptr = args->data.str.area;
name.len = args->data.str.data;
} else {
name.ptr = NULL;
name.len = 0;
}
ctx.blk = NULL;