diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 15:05:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 15:05:16 +0100 |
commit | 0cde7b0683bf3f9550ad97bfdbedc22511c1505c (patch) | |
tree | 1d283a5053375dee99f796982d0d24b3d4aa4c3b /contrib | |
parent | d7d26a2a5f8b1af2ff68d275410bc2d3ad0cc44d (diff) | |
download | rspamd-0cde7b0683bf3f9550ad97bfdbedc22511c1505c.tar.gz rspamd-0cde7b0683bf3f9550ad97bfdbedc22511c1505c.zip |
[Minor] Init tree before usage
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/lua-lpeg/lptree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/lua-lpeg/lptree.c b/contrib/lua-lpeg/lptree.c index 7a91931bf..cb8342459 100644 --- a/contrib/lua-lpeg/lptree.c +++ b/contrib/lua-lpeg/lptree.c @@ -358,6 +358,7 @@ static TTree *gettree (lua_State *L, int idx, int *len) { static TTree *newtree (lua_State *L, int len) { size_t size = (len - 1) * sizeof(TTree) + sizeof(Pattern); Pattern *p = (Pattern *)lua_newuserdata(L, size); + memset(p, 0, size); luaL_getmetatable(L, PATTERN_T); lua_pushvalue(L, -1); lua_setuservalue(L, -3); |