aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_util.c
diff options
context:
space:
mode:
authorMiecio Za <miecio@miecio.net>2019-03-18 20:53:02 +0100
committerMiecio Za <miecio@miecio.net>2019-03-18 20:53:02 +0100
commitcd50acbfc30ddba123ee85b7d9c2ee7ca9d0c20b (patch)
treea61807a7b85369201a47cdcfd04a6638776a4749 /src/lua/lua_util.c
parent925b1b072360e12f68a0992d3bdcb360c35f7663 (diff)
parent723e9e963380dfa12d5b9e0f7b999535e4917e48 (diff)
downloadrspamd-cd50acbfc30ddba123ee85b7d9c2ee7ca9d0c20b.tar.gz
rspamd-cd50acbfc30ddba123ee85b7d9c2ee7ca9d0c20b.zip
Merge branch 'master' into lua_string_utils
Diffstat (limited to 'src/lua/lua_util.c')
-rw-r--r--src/lua/lua_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index 0a1fc2010..1a37eaef6 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -1197,7 +1197,7 @@ lua_util_tokenize_text (lua_State *L)
{
LUA_TRACE_POINT;
const gchar *in = NULL;
- gsize len, pos, ex_len, i;
+ gsize len = 0, pos, ex_len, i;
GList *exceptions = NULL, *cur;
struct rspamd_lua_text *t;
struct rspamd_process_exception *ex;
@@ -2263,6 +2263,8 @@ lua_util_gzip_decompress (lua_State *L)
return luaL_error (L, "invalid arguments");
}
+ sz = t->len;
+
memset (&strm, 0, sizeof (strm));
/* windowBits +16 to decode gzip, zlib 1.2.0.4+ */
rc = inflateInit2 (&strm, MAX_WBITS + 16);