diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-24 14:13:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-05-24 14:13:13 +0100 |
commit | eb5fc65aca905ad38bab0dae85dba0f9a56d7766 (patch) | |
tree | 126bf68a7c23e471920f73951ad8cd2326237a5b /src/plugins/dkim_check.c | |
parent | 8303b194152ffc02b5079b6bd08f1fecfd43f5d0 (diff) | |
download | rspamd-eb5fc65aca905ad38bab0dae85dba0f9a56d7766.tar.gz rspamd-eb5fc65aca905ad38bab0dae85dba0f9a56d7766.zip |
[Fix] Do not use lightuserdata for traceback
LuaJIT limits lightuserdata usage to 47 bits. On Arm64, this leads to
break of the C <-> Lua interoperability using this type.
This rework has changed traceback function behaviour from lightuserdata
opaque pointer (GString * in particular) to luaL_Buffer.
Issue: #2906
Diffstat (limited to 'src/plugins/dkim_check.c')
-rw-r--r-- | src/plugins/dkim_check.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 0cfea3f92..7a242934f 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -1317,7 +1317,7 @@ dkim_sign_callback (struct rspamd_task *task, gint err_idx; gint64 arc_idx = 0; gsize len; - GString *tb, *hdr; + GString *hdr; GList *sigs = NULL; GError *err = NULL; const gchar *selector = NULL, *domain = NULL, *key = NULL, *key_type = NULL, @@ -1344,9 +1344,8 @@ dkim_sign_callback (struct rspamd_task *task, rspamd_lua_setclass (L, "rspamd{task}", -1); if (lua_pcall (L, 1, 1, err_idx) != 0) { - tb = lua_touserdata (L, -1); - msg_err_task ("call to user extraction script failed: %v", tb); - g_string_free (tb, TRUE); + msg_err_task ("call to user extraction script failed: %s", + lua_tostring (L, -1)); } else { if (lua_istable (L, -1)) { |