diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-19 12:08:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-19 12:08:48 +0100 |
commit | 19424515ec8b3dcb133cef30bf10f8c6b19cc3aa (patch) | |
tree | f38a63933f8164f0a39a60cf04f628d5eef52fcb /src/lua/lua_text.c | |
parent | b5a184a0f8b376f3917f103b637a3db17925d2ae (diff) | |
download | rspamd-19424515ec8b3dcb133cef30bf10f8c6b19cc3aa.tar.gz rspamd-19424515ec8b3dcb133cef30bf10f8c6b19cc3aa.zip |
[Minor] Fix some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/lua/lua_text.c')
-rw-r--r-- | src/lua/lua_text.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/lua_text.c b/src/lua/lua_text.c index bec16c3b6..afda7d941 100644 --- a/src/lua/lua_text.c +++ b/src/lua/lua_text.c @@ -1519,7 +1519,7 @@ lua_text_oneline (lua_State *L) struct rspamd_lua_text *t = lua_check_text (L, 1); const gchar *p, *end; gchar *dest, *d; - gsize byteset[32 / sizeof(gsize)]; /* Bitset for ascii */ + guint64 byteset[32 / sizeof(guint64)]; /* Bitset for ascii */ gboolean copy = TRUE, seen_8bit = FALSE; guint *plen; @@ -1553,14 +1553,14 @@ lua_text_oneline (lua_State *L) /* Fill pattern bitset */ memset (byteset, 0, sizeof byteset); /* All spaces */ - byteset[0] |= GSIZE_FROM_LE (0x100003600); + byteset[0] |= GUINT64_FROM_LE (0x100003600LLU); /* Control characters */ - byteset[0] |= GSIZE_FROM_LE (0xffffffff); + byteset[0] |= GUINT64_FROM_LE (0xffffffffLLU); /* Del character */ - byteset[1] |= GSIZE_FROM_LE (0x8000000000000000); + byteset[1] |= GUINT64_FROM_LE (0x8000000000000000LLU); /* 8 bit characters */ - byteset[2] |= GSIZE_FROM_LE (0xffffffffffffffffLLU); - byteset[3] |= GSIZE_FROM_LE (0xffffffffffffffffLLU); + byteset[2] |= GUINT64_FROM_LE (0xffffffffffffffffLLU); + byteset[3] |= GUINT64_FROM_LE (0xffffffffffffffffLLU); p = t->start; end = t->start + t->len; |