mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 15:04:42 +00: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
@ -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 New Issue
Block a user