From 0effbd0b4d9dd5b7a7ad888968cea07a2566670f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 1 Feb 2021 14:19:49 +0000 Subject: [Fix] Avoid curse of dynamic array referencing --- src/libserver/protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libserver/protocol.c') diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 31b0308cb..7307c95c8 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -1251,7 +1251,7 @@ rspamd_scan_result_ucl (struct rspamd_task *task, obj = ucl_object_typed_new (UCL_OBJECT); } - kh_foreach_value_ptr (mres->symbols, sym, { + kh_foreach_value (mres->symbols, sym, { if (!(sym->flags & RSPAMD_SYMBOL_RESULT_IGNORED)) { sobj = rspamd_metric_symbol_ucl (task, sym); ucl_object_insert_key (obj, sobj, sym->name, 0, false); @@ -1968,7 +1968,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task) i = 0; - kh_foreach_value_ptr (mres->symbols, sym, { + kh_foreach_value (mres->symbols, sym, { id = rspamd_symcache_find_symbol (task->cfg->cache, sym->name); -- cgit v1.2.3