mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
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:
parent
220567ec34
commit
e2c78cd3e8
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue