mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 19:56:59 +00:00
BUG/MEDIUM: WURFL: segfault in wurfl-get() with missing info.
A segfault may happen in ha_wurfl_get() when dereferencing information not present in wurfl-information-list. Check the node retrieved from the tree, not its container. This fix must be backported to 1.9.
This commit is contained in:
parent
0a7a4fbbc8
commit
d173e93aa7
@ -514,9 +514,10 @@ static int ha_wurfl_get(const struct arg *args, struct sample *smp, const char *
|
||||
while (args[i].data.str.area) {
|
||||
chunk_appendf(temp, "%c", global_wurfl.information_list_separator);
|
||||
node = ebst_lookup(&global_wurfl.btree, args[i].data.str.area);
|
||||
wn = container_of(node, wurfl_data_t, nd);
|
||||
|
||||
if (wn) {
|
||||
if (node) {
|
||||
|
||||
wn = container_of(node, wurfl_data_t, nd);
|
||||
|
||||
switch(wn->type) {
|
||||
case HA_WURFL_DATA_TYPE_UNKNOWN :
|
||||
|
Loading…
Reference in New Issue
Block a user