m-lua-scripting: check argument type is table to avoid crashing
In conf_apply_rules, check input argument is a table before assuming it is and potentially crashing. Add check also in wplua_table_to_properties to avoid similar bugs.
This commit is contained in:
@@ -1675,6 +1675,7 @@ conf_apply_rules (lua_State *L)
|
||||
|
||||
ap = wp_properties_new_empty ();
|
||||
section = luaL_checkstring (L, 1);
|
||||
luaL_checktype (L, 2, LUA_TTABLE);
|
||||
mp = wplua_table_to_properties (L, 2);
|
||||
if (lua_isuserdata (L, 3)) {
|
||||
WpSpaJson *v = wplua_checkboxed (L, 3, WP_TYPE_SPA_JSON);
|
||||
|
Reference in New Issue
Block a user