Discarded math.random, as it is an OoS-magnet.
This commit is contained in:
parent
62d46ebc5e
commit
3769893731
1 changed files with 6 additions and 0 deletions
|
@ -2241,6 +2241,12 @@ LuaKernel::LuaKernel()
|
|||
lua_setfield(L, -2, "wml_actions");
|
||||
lua_pop(L, 1);
|
||||
|
||||
// Remove the math.random function, since it is not OoS-proof.
|
||||
lua_getglobal(L, "math");
|
||||
lua_pushnil(L);
|
||||
lua_setfield(L, -2, "random");
|
||||
lua_pop(L, 1);
|
||||
|
||||
// Store the error handler, then close debug.
|
||||
lua_pushlightuserdata(L, (void *)&executeKey);
|
||||
lua_getglobal(L, "debug");
|
||||
|
|
Loading…
Add table
Reference in a new issue