mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02: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) {
|
if (args && args->type == ARGT_STR) {
|
||||||
name.ptr = args->data.str.area;
|
name.ptr = args->data.str.area;
|
||||||
name.len = args->data.str.data;
|
name.len = args->data.str.data;
|
||||||
|
} else {
|
||||||
|
name.ptr = NULL;
|
||||||
|
name.len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.blk = NULL;
|
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) {
|
if (args && args->type == ARGT_STR) {
|
||||||
name.ptr = args->data.str.area;
|
name.ptr = args->data.str.area;
|
||||||
name.len = args->data.str.data;
|
name.len = args->data.str.data;
|
||||||
|
} else {
|
||||||
|
name.ptr = NULL;
|
||||||
|
name.len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.blk = NULL;
|
ctx.blk = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user