commit b5a184a: [Fix] Fix hash table lookup

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Sep 19 11:14:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-19 11:47:00 +0100
URL: https://github.com/rspamd/rspamd/commit/b5a184a0f8b376f3917f103b637a3db17925d2ae

[Fix] Fix hash table lookup
Found by: coverity scan

---
 src/lua/lua_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index b095de8e7..393a370a8 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -5725,7 +5725,7 @@ lua_task_set_settings (lua_State *L)
 					if (!isnan (act_score)) {
 						struct rspamd_action *new_act;
 
-						HASH_FIND_PTR (task->cfg->actions, act_name, new_act);
+						HASH_FIND_STR (task->cfg->actions, act_name, new_act);
 
 						if (new_act == NULL) {
 							/* New action! */


More information about the Commits mailing list