aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-06 22:18:57 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-06 22:19:22 +0000
commit900d06b6072263ecefbb5a21b219a39fe711a2c0 (patch)
tree763350e6dcf57512b29004848847fc9ba14fe73a /contrib
parent8f0dae5432a766fbb5b23aa1c7bb09234e89b78d (diff)
downloadrspamd-900d06b6072263ecefbb5a21b219a39fe711a2c0.tar.gz
rspamd-900d06b6072263ecefbb5a21b219a39fe711a2c0.zip
[Fix] Fix merging of the implicit arrays
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libucl/ucl_parser.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/contrib/libucl/ucl_parser.c b/contrib/libucl/ucl_parser.c
index 11b871259..088813918 100644
--- a/contrib/libucl/ucl_parser.c
+++ b/contrib/libucl/ucl_parser.c
@@ -1067,12 +1067,20 @@ bool
ucl_parser_process_object_element (struct ucl_parser *parser, ucl_object_t *nobj)
{
ucl_hash_t *container;
- ucl_object_t *tobj;
+ ucl_object_t *tobj = NULL, *cur;
char errmsg[256];
container = parser->stack->obj->value.ov;
- tobj = __DECONST (ucl_object_t *, ucl_hash_search_obj (container, nobj));
+ DL_FOREACH (parser->stack->obj, cur) {
+ tobj = __DECONST (ucl_object_t *, ucl_hash_search_obj (cur->value.ov, nobj));
+
+ if (tobj != NULL) {
+ break;
+ }
+ }
+
+
if (tobj == NULL) {
container = ucl_hash_insert_object (container, nobj,
parser->flags & UCL_PARSER_KEY_LOWERCASE);
@@ -1094,8 +1102,6 @@ ucl_parser_process_object_element (struct ucl_parser *parser, ucl_object_t *nobj
* - if a new object has bigger priority, then we overwrite an old one
* - if a new object has lower priority, then we ignore it
*/
-
-
/* Special case for inherited objects */
if (tobj->flags & UCL_OBJECT_INHERITED) {
prinew = priold + 1;