diff options
author | Miecio Za <miecio@miecio.net> | 2019-03-18 20:53:02 +0100 |
---|---|---|
committer | Miecio Za <miecio@miecio.net> | 2019-03-18 20:53:02 +0100 |
commit | cd50acbfc30ddba123ee85b7d9c2ee7ca9d0c20b (patch) | |
tree | a61807a7b85369201a47cdcfd04a6638776a4749 /src/lua/lua_util.c | |
parent | 925b1b072360e12f68a0992d3bdcb360c35f7663 (diff) | |
parent | 723e9e963380dfa12d5b9e0f7b999535e4917e48 (diff) | |
download | rspamd-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.c | 4 |
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); |