aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_util.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 15:01:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 15:01:55 +0000
commitf7aee39a9dc81ae437e1dcc651a7335a7ae071d3 (patch)
tree491a5422b5e32feabad05fca0cdb9ae196f731a5 /src/lua/lua_util.c
parent376b5cac00888b7d3203f2c3e5611b0d25044c6b (diff)
downloadrspamd-f7aee39a9dc81ae437e1dcc651a7335a7ae071d3.tar.gz
rspamd-f7aee39a9dc81ae437e1dcc651a7335a7ae071d3.zip
[Fix] Fix various issues found by PVS Studio
https://www.viva64.com/
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 d78e230e7..dad8c336b 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -1177,7 +1177,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;
@@ -2243,6 +2243,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);