mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-08 10:51:06 +01:00
BUG/MAJOR: lua: use correct object size when initializing a new converter
In hlua_converters_new(), we used to allocate the size of an hlua_txn instead of hlua_smp, resulting in random crashes with one integer being randomly overwritten at the end, even when no converter is being used.
This commit is contained in:
parent
482564f309
commit
08ef3d055d
@ -2813,7 +2813,7 @@ static int hlua_converters_new(lua_State *L, struct hlua_txn *txn, int stringsaf
|
||||
* same than the TXN object.
|
||||
*/
|
||||
lua_newtable(L);
|
||||
hs = lua_newuserdata(L, sizeof(struct hlua_txn));
|
||||
hs = lua_newuserdata(L, sizeof(struct hlua_smp));
|
||||
lua_rawseti(L, -2, 0);
|
||||
|
||||
hs->s = txn->s;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user