commit 4626766: [Minor] Remove string from top to avoid lua stack issues

Vsevolod Stakhov vsevolod at highsecure.ru
Fri May 24 15:35:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-05-24 14:52:01 +0100
URL: https://github.com/rspamd/rspamd/commit/4626766ee1cbe74b33f3194d8dda97880e8c5c2e

[Minor] Remove string from top to avoid lua stack issues

---
 src/lua/lua_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index c2940c9ab..f7793748a 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -1693,6 +1693,7 @@ rspamd_lua_get_traceback_string (lua_State *L, luaL_Buffer *buf)
 	const gchar *msg = lua_tostring (L, -1);
 
 	luaL_addstring (buf, msg);
+	lua_pop (L, 1); /* Error string */
 	luaL_addstring (buf, "; trace:");
 	rspamd_lua_traceback_string (L, buf);
 }


More information about the Commits mailing list