aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-01 14:19:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-02-01 14:20:13 +0000
commit0effbd0b4d9dd5b7a7ad888968cea07a2566670f (patch)
tree6a8ef2dff72ced5d393d541b8702aba025fe9df9 /src/libserver/protocol.c
parent030749e981e0abc13da6200d6e3419b12dd4609d (diff)
downloadrspamd-0effbd0b4d9dd5b7a7ad888968cea07a2566670f.tar.gz
rspamd-0effbd0b4d9dd5b7a7ad888968cea07a2566670f.zip
[Fix] Avoid curse of dynamic array referencing
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c4
1 files changed, 2 insertions, 2 deletions
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);